Help Needed!! Parameter not updated
Hmm I wonder too :-D
*edit - what is the value of pairs?
if(OrdersTotal() < pairs) {
tradeCount = 1;
Going forward use SRC feature to post code. Use print statement inside if loop. Use like below:
if(OrdersTotal() != 0 && units * GlobalVariableGet(GLOBALNAME+Symbol()+Period()+"_"+symb[i])< 0) { tradeCount = 0; CloseOrder(symb[i], units); GlobalVariableSet(GLOBALNAME+Symbol()+Period()+"_"+symb[i], 0); Print("Inside first IF. tradeCount: ",tradeCount); continue; } if(OrdersTotal() < pairs) { tradeCount = 1; CreateOrder(symb[i], units); GlobalVariableSet(GLOBALNAME+Symbol()+Period()+"_"+symb[i], units); Print("Inside second IF. tradeCount: ",tradeCount); }
pairs = 2
thanks for the comment guys!!
ShinjiOno:
Code as above, I managed to close trade, however how come my tradeCount always = 1?
Is this . . . .
units * GlobalVariableGet(GLOBALNAME+Symbol()+Period()+"_"+symb[i])
. . ever negative ?
Print("tradeCount ",tradeCount);
Code as above, I managed to close trade, however how come my tradeCount always = 1?