How do I change the code to get the first position?
ghobar:
the last smallest "i" against the succeeding "i" that both "i" meets your intended condition above is the first sell position indexHello to all professors
With this code, I get the last selling position
How do I change the code to get the first position?
int first=0,last=0; double firstprice=0.0,lastprice=0.0; for... { if(OrderSymbol()=="EURUSD" && OrderMagicNumber()==Magic2 && OrderType()==OP_SELL) { if (last==0) { last = i; first = i; . . . lastprice = price(i); } else { if (i<first) { . . . first = i; firstprice = price(i); } continue; } } continue; }just typed
Hello to all professors
With this code, I get the last selling position
How do I change the code to get the first position?