fxDreema

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

    Getting values from other Indicators

    Questions & Answers
    5
    58
    13214
    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.
    • Zackry
      Zackry @roar last edited by Zackry

      @roar can you please take a look at this , if its the right way to put the Risk to reward ratios? because some thing is wrong

      https://fxdreema.com/shared/sSdL4sk9b

      i am trying to put price labels at 1:1 1:2 1:3

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

        @zackry said in Getting values from other Indicators:

        will it be possible to use other indicators entirely into the project like this so that we don't have to give the indicator along with the EA when giving the ea to someone?

        Yes. The functions utilized (MarketInfo(), MathMax(), AccountInfoDouble(), etc...) are just reqular mql4 code, nothing is "tied" to the indicator

        @zackry said in Getting values from other Indicators:

        @roar can you please take a look at this , if its the right way to put the Risk to reward ratios? because some thing is wrong

        https://fxdreema.com/shared/sSdL4sk9b

        i am trying to put price labels at 1:1 1:2 1:3

        0_1564062898435_2b8e7fac-0941-49fe-94b2-19495c6c0b17-image.png
        I think you must first convert the SL pips to a raw price number, even though you selected "as price fraction".
        The EA is now trying to calculate the final level (ask price + SL) as something like 1.1123 + 20 = 21.1123

        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

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

          @roar i tried other options as well, like Numeric value , text(code input), pips->value as it is etc but nothing worked

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

            @zackry
            0_1564064965843_4736e0fd-7692-4ebc-92f6-ca743644edd5-image.png

            See the "adjust", now the pips is raw price. For example, 20 -> 0.0020

            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

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

              @roar but wouldnt it cause problems for the jpy pairs?
              BTW, i just tried that and still no levels
              https://fxdreema.com/shared/tDVy8qtYd

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

                @zackry Yes, it definitely will cause problems with JPY. This is why I try to avoid pip values altogether.

                Anyway, when you get it working on EURUSD, you can generalize the pips with the function MarketInfo(Symbol(), MODE_TICKSIZE)). I don't exactly know how to do it, but I think this is what the custom indi uses.
                https://docs.mql4.com/constants/environment_state/marketinfoconstants

                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

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

                  @roar interesting and strange, i am not getting any object

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

                    @zackry
                    What is the plan here, again? Do you need a horizontal level or text? If level, how should it be calculated?

                    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

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

                      @roar here is what i am trying to do when the trade opens then there should be three price labels or lines printed on the screen , let say the stooploss is 10 pips then the first object 10 pips above the trade and second 20 pips and third 30 pips above in case of a buy and 10, 20, 30 pips below the trade for sell
                      its easy to do when the stoploss is fixed but its a nightmare when the atr is involved

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

                        @zackry
                        I see. Well, at that point we already know the open - SL difference, lets just use that... a sec

                        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

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

                          @roar yes and as you might remember we calculated the sl in pips yesterday i thought i can use that but no luck
                          0_1564067144800_Screenshot_23.png

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

                            My approach:
                            When buying, select the order with loop block, then use OrderOpenPrice()+OrderStopLoss() functions to calculate the 1:1 level.
                            1:2 level would be OrderOpenPrice()+OrderStopLoss() * 2 and so on...
                            Bonus: no pip values, universal symbol compatibility

                            You can just copy-paste these blocks after your buy: https://fxdreema.com/shared/2jZ5X59Qd
                            I'm getting an error though, not sure if it is just my demo account

                            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

                            Zackry 2 Replies Last reply Reply Quote 1
                            • Zackry
                              Zackry @roar last edited by

                              @roar thanks bro I am gonna give it a go

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

                                @roar a quick question bro
                                what if i want to use price labels instead of text, then where do i put the code?0_1564072299026_Screenshot_24.png

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

                                  @zackry
                                  The Price section, replace Candle with Value, and then select text(code input)

                                  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

                                  Zackry 2 Replies Last reply Reply Quote 0
                                  • Zackry
                                    Zackry @roar last edited by

                                    @roar nope still nothing

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

                                      It seems OrderStopLoss() is actually a level, not price fraction.
                                      This line calculates the 1:1 level:
                                      OrderOpenPrice()+(OrderOpenPrice()-OrderStopLoss())*1
                                      1:2 level:
                                      OrderOpenPrice()+(OrderOpenPrice()-OrderStopLoss())*2

                                      Now it works with the text object. I don't really know how the price label works.
                                      0_1564073899640_55293e31-d13f-4aa8-a21a-82239ddf06f5-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

                                      1 Reply Last reply Reply Quote 1
                                      • Zackry
                                        Zackry @roar last edited by

                                        @roar finally
                                        https://fxdreema.com/shared/DjiYkYSNb
                                        its working i had to change the approach a little bit
                                        and roar thank you very much for staying till the end.
                                        wouldnt have been possible without your help

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

                                        Online Users

                                        B
                                        A
                                        J
                                        D
                                        E

                                        26
                                        Online

                                        146.7k
                                        Users

                                        22.4k
                                        Topics

                                        122.6k
                                        Posts

                                        Powered by NodeBB Forums | Contributors