Not logged in

Forums

Viewing 3 posts - 1 through 3 (of 3 total)

Forums>EA Wizard>Strategy Samples>How to make ATR values editable in the EA Settings

  • #201247 |
    Conmariin
    Participant
    46 Posts

    EA-Wizard has a great function for SL and TS to calculate with ATR. The formula is for example: 2 * ATR (14)
    But than it is hardcoded in the EA and you can’t change the values 2 and 14. You must recode the EA everytime.

    I didn’t figure out how to make a solution with EA-Wizard completely but on behalf on EA-Wizard and on behalf manual coding in Meta-Editor. It’s easy. I describe how:

    First make Variables in EA-Wizard in the Strategy-Tab for example like in 1.png. And make the ATR-Settings for SL and TP. Than save your EA. Open the mq4-file with the Meta-Editor and search for ATR in the code. You will find the code for ATR like in 2.png. Exchange the numbers (for example 2 and 14) with the variables from 1.png. Do this for SL and TS, Long and Short. Save and compile your EA in Meta-Editor. Done! 🙂

    Attachments:
    You must be logged in to view attached files.
    #201252
    Administrator
    348 Posts

    Hello,

    you can define your ATR stop-loss manually. See the file attached

    Attachments:
    You must be logged in to view attached files.
    #201279
    Conmariin
    Participant
    46 Posts

    Thanks tomas. 🙂

     

    • This reply was modified 2 months ago by Conmariin Conmariin.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.