fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Get TP from Risk calculated over last 5 Bars

    Questions & Answers
    3
    5
    613
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rudy 1 last edited by

      Hello everyone 🙂 First question I have here, but just wanted to say thank you to everyone for answering questions on the forums, I have learnt soooo much just from previous replies 🙂

      I am busy creating an EA that bases its TP on risk calculated from the previous 5 bars. The SL is calculate from the trigger bar(candle position 1) so thats not a problem, but the TP(for a sell) is calculated from the high of the trigger candle +3 pips minus the low of the previous 5 candles -3 pips.

      I have created a variable and have used the formula block to calculate the value, but it doesnt seem to executing correctly when I run back tests.

      Any help would be greatly appreciated.

      https://fxdreema.com/shared/t8o9RZAab

      Q 1 Reply Last reply Reply Quote 0
      • Q
        q8carpenter @rudy 1 last edited by

        @rudy-1 hello. could this be the problem?

        0_1589712395273_formulavariable.jpg

        R 1 Reply Last reply Reply Quote 0
        • R
          rudy 1 @q8carpenter last edited by

          @q8carpenter Thanks for the response, still getting 0.00 as TP so doesnt look like it worked 😕

          roar 1 Reply Last reply Reply Quote 0
          • roar
            roar @rudy 1 last edited by

            @rudy-1 This formula result is not a pip number, its raw price value. Set your SL mode to Custom (price fraction).
            0_1589723098672_e575ac9f-555d-4ccd-80a1-132873ebf69f-image.png

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            R 1 Reply Last reply Reply Quote 0
            • R
              rudy 1 @roar last edited by

              @roar That worked! Excellent! Thank you 😄

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              • First post
                Last post

              Online Users

              S
              D
              K
              B
              F
              W
              T
              J
              J
              P

              19
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors