Download MetaTrader 5

How to place order at distance from moving average?

To add comments, please log in or register
nadiawicket
417
nadiawicket  

Good day .

‌I am trying to place an order at 10 points below from the LWMA using the following line of code:

if ((Ask<=(iMA(Symbol(), 1, 2 , 0, MODE_LWMA, 0, 0)) -10*Point)

‌It does it right only sometimes. How do I get it to always count the correct distance from the ask line ?

Thanks in advanced.‌

honest_knave
Moderator
2342
honest_knave  

Most brokers are 5 digits now.

In which case 10 points = 1 pip.

You may already be aware of that 

nadiawicket
417
nadiawicket  

Just figured out its just the lag and it cant be perfect all the time.

Thanks ‌

To add comments, please log in or register