Help with locig and architecture of one code line, price must not be xxx away from MA

 

Hello.

I´m making my first indicator for MT4, how can I tell the indicator to signal me only if the close of previous candle close was xx pips or closer to xx MA?


I would love it to be universal so it would work for both gold and mayors.


Thanks a lot

 
morgangaaserud: signal me only if the close of previous candle close was xx pips or closer to xx MA?
  1. PIP only has meaning on currencies. Try How to manage JPY pairs with parameters? - Day Trading Strategies - MQL4 and MetaTrader 4 - MQL4 programming forum #3
  2. Get the close, get the MA compare the difference.
Reason: