Programming touch variable in the averages

 


I would like to create a variable that when it touches the moving average has the value of 1 and after it performs an operation it becomes 0 and only allows new operations when it is worth 1 (touches the average)
 
gablima96:


I would like to create a variable that when it touches the moving average has the value of 1 and after it performs an operation it becomes 0 and only allows new operations when it is worth 1 (touches the average)

A variable does not touch any moving average. Price, trendlines etc do.

 
Keith Watford:

A variable does not touch any moving average. Price, trendlines etc do.

Understood. Do you know how to do it?
 

Do what?

A variable doesn't touch anything.
     How To Ask Questions The Smart Way. 2004
          Be precise and informative about your problem

A price doesn't either.
          Doubles are rarely equal. Understand the links in:
          The == operand. - MQL4 programming forum #2 2013.06.07

Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help 2017.04.21

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum 2018.05.12

Reason: