Sounds simple enough but I am having trouble developing the "within" part. I have defined my MA's and I understand the "counts" command to give me the condition is true for 5 from 10. Just having trouble developing the within 3 ticks.
Example:
I would like to be alerted on bar close, when a 10 period ema is within 3 ticks of the 20 period ema and within 3 ticks of the 30 period ema AND the 20 period ema must also be within 3 ticks of the 30 period ema for 5 of the last 10 bars.
OR
Condition "A" is defined as True :
At close of bar if
ValueEMA10 = ValueEMA20(+/- 3ticks) AND
ValueEMA10 = ValueEMA30(+/- 3ticks) AND
ValueEMA20 = ValueEMA30(+/- 3ticks)
If "A" = True for 5 bars out of 10 alert (play tubular bells) or (Draw Mona-Lisa) etc
I can find <, >, <=, >=, = etc etc etc but I want a +/- 3 (ticks); percent etc is no good otherwise you will have to redefine this for each instrument.
Can anyone help please.
In case your wondering, this will define a flattening of price in a trend and alert to a possible breakout opportunity; either continuation or reversal. I trade with range bars and this alert would be the equivalent of a "doji" on a c'stick chart.
Saves me watching 10+ instruments for a signal condition as I can then use this indicator / strategy in the "Market Analyser" window which will monitor any number of instruments without taking up any screen real estate. (I hope) !! Monitoring MA's has proved to be far more effective than price as they lag and thus filter out "fake outs".
If you're excited enough and want to help out - I will then be developing this to have configurable time periods so it is only active when you want to trade. Say between 9.30am and 11.30am and 1.30pm to 3.00pm. (No point alerting you at midnight when the condition is almost certainly true because price is range bound due to low volume)
Any constructive help gratefully appreciated, I'll get there eventually but am hoping to speed things up.
Sincerely;
Ben.
Comment