Vwrestler
Arrays would be more practical, see this article for the full story
'Considering Orders in a Large Program'
Good Luck
-BB-
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
My idea is:
// set up 7 boxes to store the result of the last 6 trades
int box0=0;
int box1=0;
int box2=0;
int box3=0;
int box4=0;
int box5=0;
int box6=0;
int risklevel=0
// if last trade wins, box0 =1
if ( OrderProfit() > 0 )
box0=1;
// if last trade loses, box0 = 0
if ( OrderProfit() < 0 )
box0=0;
// shift one space to store new value
box6=box5;
box5=box4;
box4=box3;
box3=box2;
box2=box1;
box1=box0;
// add up the value of the 6 boxes to see how many wins and losses
risklevel = box1 + box2 + box3 + box4 + box5 + box6;
// decide risklevel, risklevel = 0-6 ...