Need a little help with modifying an Indicator (Indicator Arrows) created by Ernst (https://www.mql5.com/en/code/12412). Firstly, a big shout out to Ernst for creating this gem! :)
I don't have any coding experience with MQL5, hence seeking help.
1. It appears the Stochastic triggers a Buy every time the %K line breaks above the %D line, and a Sell every time the %K line breaks below the %D line, irrespective of their absolute values. Instead, can this buy/sell trigger be activated with the same rules, but ONLY when the %D line is below 20 (for Buys), and above 80 (for Sells) 2. FYI, I use Stochastics and place my trades on the 15 min chart, but I watch the Moving Averages on the 1 Hour Chart. My second criteria for this indicator is for Buys to be triggered only when the Price has CLOSED above the 20 period Simple Moving Average on the 1 Hour chart (and conversely, for the Sell trigger, price should have CLOSED below the 20 period SMA on the 1 Hour chart). At the moment, it appears the indicator takes a work-in-progress bar, whereas I’d like for it to CLOSE above or below the 20 period DMA on the 1 hour chart, before this condition is met. This condition, together with the Stochastics trigger in (1) should draw the arrows. 3. Thirdly, I’d like this indicator to be applied to a long historical timeframe – say Last 3 years (or more) data on the 15 min chart. How can I set this? I tried to use Range in the Indicator settings, but that didn’t seem to work. What did I miss? I’ve attached a screenshot of my Settings and the Full code file. All help appreciated.Ayush