Download MetaTrader 5
To add comments, please log in or register
Articles have already helped many traders. Come and read them!
Nauris Mucenieks
809
Nauris Mucenieks 2015.06.15 11:34 

hi everybody,


even tho my understanding of things like this is growing a bit bigger, im stuck once again.

 

which basically opens a trade when X pips from the last trade (this case its a buy order) has changed in the opposite direction.

now, logical thing would be to change the last_buy_price - ask to a ask - last_buy_price.. right?

well, i tried that, and a ton of other combos - it kinda does what i want it to - but it opens not one, but a gazzilion orders.

any help?


i have this here :

if (BUY_ORDERS>0 && (LAST_BUY_PRICE-Ask)>=(DISTANCE)*_Point*mult){
Marco vd Heijden
Moderator
4680
Marco vd Heijden 2015.06.15 12:53  
if(OrdersTotal==0)
 {
  // here we can open one order
 }


Or set a flag when you opened your order.

if(order==0)
 {
 //order something
 order=1;
 }


/
To add comments, please log in or register