Need help with Editing an Indicator (Indicator Arrows)

 

Hello All


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

Indicator Arrows
Indicator Arrows
  • votes: 15
  • 2015.02.10
  • Ernst Van Der Merwe
  • www.mql5.com
Up/Down arrows drawn in chart window.
 
  1. When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. ayushagrawal:
    1. Need a little help
    2. The changes I'd like to make are very simple I suppose
    3. but I don't have any coding experience with MQL5, hence seeking help.
    4. 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?
    5. so even though the code looks very long, the modifications are likely to be small.
    6. All help appreciated.
    1. Help you with what? You haven't stated a problem. Show us your attempt (using CODE button) and state the nature of your problem.
                No free help
                urgent help.

    2. You don't know how to code, but the changes are easy? That's like saying "I don't know how to build engines but adding another cylinder should be easy."
                Is it easy (or difficult) to …? - General - MQL5 programming forum

    3. learn to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
      or pay (Freelance) someone to code it.
      We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
                No free help
                urgent help.

    4. You apply indicators to a chart. There is nothing in code or settings. What you missed is tweaking the carburetor has nothing to do with driving on the highway.

    5.  № 2

    6.  № 1