For Loop & Array problem - page 2

 
And this??

  double TwoFigures=AccountBalance()>10;
  double FiveFigures=AccountBalance()>10000;
  double SevenFigures=AccountBalance()>1000000;





 
What do you think this code will do?

    for(b;b<1;b++)
    for(b2;b2<2;b2++)
    for(b3;b3<4;b3++)
    //for(int i=0;i<=AccTrades-1;i++)
    {
     int SellTrade=OrderSend(Symbol(),OP_SELLSTOP,0.01,Bid-(5*Pips),0,0,0,"JackBuda",MagicNumber,0,clrRed);
    } 
 
Dominik Egert #:
Strict is your friend.


What is this?
(Their are all either 1 or 0)

I always have strict on, if you look above the post I posted just now.

As for this code i wanted to insert the "C's" into the for loop.

int c=0==TwoFigures;
int c2=0==FiveFigures;
int c3=0==SevenFigures;

I have tried the following:

double c=TwoFigures;
double c2=FiveFigures;
double c3=SevenFigures;

But it will not open any trades at all. Hence  I used int instead of double & it opens properly for 7 figures & not for 2 & 5 figures.

 
Dominik Egert #:
What do you think this code will do?

To open as follows but the last line works
for(b;b<1;b++)//2 figures open 1 trade
for(b2;b2<2;b2++)//5 figures open 2 trades
for(b3;b3<4;b3++)//7 figures open 4 trades <- opens properly
 
Check in the debugger what it actually does.

It's not what you intend.
 
I saw about strict after posting.
WWhat do you say this is?

AccountBalance()>10;
Its a boolean operation, the result will be either "true" or "false"...

Make a guess on what's going to be the interpretation when stored in a double or an int.


 
Dominik Egert #:
Check in the debugger what it actually does.

It's not what you intend.
It opens one more trade :(