Download MetaTrader 5

swiching the requiriment for a trade.

To add comments, please log in or register
Nauris Mucenieks
839
Nauris Mucenieks  

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
5558
Marco vd Heijden  
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