zzuegg:
in journal he says that the ticket in the OrderClose() function is not valid. but i close with Orderclose(orderticket().........)
This specific problem might be due to:in journal he says that the ticket in the OrderClose() function is not valid. but i close with Orderclose(orderticket().........)
for(i=OrdersTotal();i>0;i--){ OrderSelect(i,SELECT_BY_POS,MODE_TRADES);The order pool starts from position 0 and you have to check if selection is successful:
for(i=OrdersTotal()-1;i>=0;i--){ if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)){
if(OrdersTotal()>0) for(i=OrdersTotal();i>0;i--){The if statement is redundant as the for statement should do nothing if there are no open orders.
OrserSelect indexes start at zero. or combine in {one group}
for(int index = OrdersTotal() - 1; index >= 0; index--) if ( OrderSelect(index, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == MagicNumber // my magic number && OrderSymbol() == Symbol() ) { // and period and symbolsecond
if(tmp==0){ tmp=iCustom(Symbol(),Period(),"JMASlope",slope.period[i],slope.phase[i],1,0);Does that indicator provide two arrays AND uses zero as not valid? EMPTY_VALUE >> 0 or you mean 0,1.
WHRoeder:
The if statement is redundant as the for statement should do nothing if there are no open orders.
OrserSelect indexes start at zero. or combine in {one group} second Does that indicator provide two arrays AND uses zero as not valid? EMPTY_VALUE >> 0 or you mean 0,1.
The if statement is redundant as the for statement should do nothing if there are no open orders.
OrserSelect indexes start at zero. or combine in {one group} second Does that indicator provide two arrays AND uses zero as not valid? EMPTY_VALUE >> 0 or you mean 0,1.
hello,
orderclosing now work. thanks for that.
yes, the indicator provides two arrays. i testet both, EMPTY_VALUE and 0. both give the same result. i tryed outputing the result of both iCustom() functions, but due to double-normalizing in the alert function the results are always 0.000 - 0.0000. i think i am going to code the indicator on myself.

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
i don't understand why this EA dont work as it should.
he open 1 order but never closes it, also he don't open a second order.
in journal he says that the ticket in the OrderClose() function is not valid. but i close with Orderclose(orderticket().........)
the idea is based on three slopes.
2 for direction and 1 as trigger.
i know coding is bad, but this should only be a concept.