"@Ais:: What if I place the new orders in another function,say "New()". Will it open the orders not in the same bar but different ones?" Depends on code of the new function.
At the beginning of a new bar FMA and PFMA will be almost the same. Use 1,2 not 0,1 as Qjol already said.
OrderClose(ticket,0.1,Bid,3,Snow);
ticket2=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,SLS,TPS,"",_MagicNumber,0,Blue);//open new Sell Order
...
OrderClose(ticket11,0.1,Ask,3,Gold);
ticket12=OrderSend(Symbol(),OP_BUY
You have 4 ticket variables, you should have only one.
no, i didn't get the picture, y u thinking to cacth @ 1 & get out up there (i want 2 LOL)
"@Ais:: What if I place the new orders in another function,say "New()". Will it open the orders not in the same bar but different ones?"
Depends on code of the new function.
"If I use the following code, why isn't it opening orders in different bars? ..."
Because:
"... Rest of the code as being the same."
If I use the following code, why isn't it opening orders in different bars? Rest of the code as being the same.
With this function "start()":
//+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- if(Fun_New_Bar()) { New(); } checkclose(); //---- } //+------------------------------------------------------------------+last changes make send orders only once in current bar.