fxDreema

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

    Variables issue

    Questions & Answers
    2
    6
    1460
    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.
    • S
      seb 0 last edited by

      Evening, i'm posting a new topic cause im having somme issues with the variables fonctionnement.
      Basically im trying to give as a value to my first variable, the level of the current closing candle, and, to my second, the level of the opening 3rd previous one, to fix TP and SL, in fonction of them, half over and half below the current candle. However its continues to set very narrow TP and SL. Here is my project so you can see
      link text

      T 1 Reply Last reply Reply Quote 0
      • T
        trader.philipps @seb 0 last edited by

        @seb-0 Tried to understand what you're doing, but I need some debug statements for this. However, you run the code every 100 minutes, is that what you want to do. I have no idea how fxdreema reacts when at this time candle in not closed, yet .. which price it takes. Maybe better to do once per bar and specify the number of bars that would equal your 100 minutes on the desired timeframe?!?

        Further keep an eye on the block numbers as fxdreema run the start blocks or single blocks from lowest to highest number. In your case that means that your variable calculations happen after your buy condition check. If you don't restet the variable the results may be unpredictably.

        0_1569798620002_fa77f64d-e1e1-4fd7-afbf-d33efc1faca4-grafik.png

        See the screenshot. Here I reset Var1 each time the white dot is called.

        So try to fix that first and then we can see if it calculates the desired results.

        I like to share my knowledge, but expect the others to contribute as well.

        1 Reply Last reply Reply Quote 0
        • S
          seb 0 last edited by

          Don't know what you want by debug statements, if you need the source code.. But i've followed your advices to re-edit my project in a simpler way, with "n" bars filter, blocks name in right order, and resetting the value of the variable before the formula, still doesn't open trades. You can see it there :https://fxdreema.com/shared/9GFvcA8xc

          T 1 Reply Last reply Reply Quote 0
          • T
            trader.philipps @seb 0 last edited by

            @seb-0 Do you see some errors in expert or journal log?

            If you work with once per bar, the line is executed on first tick of the bar. If you specify your calculations on candle ID0, It's unlikely that it will have a 3 pip candlesize already.
            0_1570637774665_6fdbe55b-7f90-43af-970c-78be70ee2609-grafik.png

            So better do your calculations on previous candle with ID1!

            I like to share my knowledge, but expect the others to contribute as well.

            1 Reply Last reply Reply Quote 0
            • S
              seb 0 last edited by seb 0

              Indeed, i changed my Candles ID from 0 to 2, and added a new condition with a candle ID 1, now im at the same point than earlier : very narrow SL and TP as the journal says,
              0_1570737639993_Capture d’écran (21).png 0_1570737643536_Capture d’écran (22).png
              https://fxdreema.com/shared/u07I7FQgc

              T 1 Reply Last reply Reply Quote 0
              • T
                trader.philipps @seb 0 last edited by

                @seb-0 Yeah, some brokers have a huge stop level. If calculations are right, what I assume, I'd say change the broker or the timeframe to get bigger candles!?!

                I like to share my knowledge, but expect the others to contribute as well.

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

                Online Users

                C
                E
                M
                F
                T
                M

                19
                Online

                146.6k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors