fxDreema

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

    Help me with crossover price vs custom indicator

    Questions & Answers
    2
    8
    2244
    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.
    • E
      everjn17 last edited by

      My problem:
      Hi' guys,
      I am a Daily chart trader and I am now on a phase to test 2 indicator, where 1 act as a baseline (i use Kijun Sen) and 1 act as a confirmation (i use KusKus Starlight). So, what i want is where there are a baseline cross happen (price cross and close above or below baseline) and the confirmation value is correct (positive value meaning long trade and negative meaning short trade). Also i have a thing called one candle rule, it's a rule when a buy signal comes from baseline (where price cross and close above baseline) and the confirmation indicator still negative at the time crossover happen, i want to wait for 1 candle to give the confirmation indicator time to catch. For example on 29september a bullish baseline cross happen (Long position signal) but at the moment, confirmation indicator that i use still has negative value, then i want to wait until the candle close on next day which is 30 september, if the confirmation indicator endup giving a positive value then i am going to take a LONG Position, but if the confirmation indicator still has negative value, then i am not taking that trade.
      Now, when backtest the EA some of the trade are open and close on expected position. But when the baseline cross are happen 2 times in a row (look at this screenshoot http://prntscr.com/pcx962) the trade doesn't taken for no reason. If you look at the screenshoot this crossover happen on 02 April 2019 and 03 April 2019. What i want is my EA take a trade on 04 April 2019 since on 02 April the Bearish Crossover happen but the Confirmation Indicator value still positive (for Bearish crossover i need a negative value to enter a short position) and the next day on 03 April the Bullish Crossover happen but the confirmation indicator are now have negative value which for Bullish Crossover i need a positive value to enter a Long position. However, since i have one candle rule, i wait one more candle to give my confirmation indicator chance to catch up. And on 04 April my confirmation indicator did catch up giving me a positive value meaning i am allowed to take a Long trade. But my EA doesn't take it. For whatever reason it didn't take that trade.

      What I tried:
      If you can see on my algorithm (https://fxdreema.com/shared/A1bKuTGde), after the No Trade block, i have a condition to check is the crossover happen or not between the candle and my baseline. I use the value of 0 for my candle id and i use 0 for my baseline candle id as well with 1 cross width. After that if this block giving False result then it'll check for the one candle rule which i check the previous candle with value 1 for candle id and 1 for baseline candle id and 1 cross width. But this doesn't give any result i expected.
      I also tried to change the value to 1 for candle id and 1 for baseline candle id with 1 cross widht for the crossover check. Then i put candle id value and baseline candle id value into 2, but cross widht still 1 for one candle rule check. Still this not solve the problem.

      I tried to mess with the once per bar block, put it before the condition block but still no good result. Lastly i move the once per bar block just before the trade taken on the last check, but still it didn't go well.

      My platform:
      I use MT4,

      Please help me with this problem, already feel lil bit frustrated since i think everything is setting up correctly but end up not working.
      If you need link to the indicator i mention, i can give it.

      Thanks for your attention,
      Regards

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

        @everjn17 NNFX in da house :)) I can try to help you, but your project is a bit large to just overview it. Maybe we go one issue by another?

        First you use candle ID 0 for the indicator checks. As indicators usually repaint on current candle, you may consider better to use candle ID:1 - btw. that i sthe definition by vp. Price has to close above / below baseline!

        For the cross issue and the 1 candle after .. For instance on block KIJUN (593) you may specifiy the width to 2. That means the cross may have happen on the candle that is specified in the field candle ID or +1 candle.
        In your case as candle ID is set to 0, the cross might have happened on candle ID 0 or 1.

        Does that make sense?

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

        1 Reply Last reply Reply Quote 0
        • E
          everjn17 last edited by

          @trader-philipps , yea man 🙂
          Yes, i did try using candle id : 1 for the left operand, and for the right operan which my indicator sits i use value by candle id :1 as well but didn't work.

          But as i know the fxdreema admin ever said on some post that candle between the crosswidth doesn't count. Example for cross width 3, then it only count the current candle with candle + 3, not including candle +2 and candle +1.

          This what i confuse, when i set the candle id for 0, doesn't that mean the cross will be detected when current candle closed?

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

            @everjn17 Okay, did a quick test on width of x>. I draw a line on candle ID:1 if condition is true.

            Here the results:

            0_1569891041903_Auswahl_603.png

            0_1569891051631_Auswahl_601.png

            Condition with width=2 for Closing Price x> Indicator value this means:

            1. Condition valid if there was a cross-over and closing price was above indicator.

            2. Condition stays valid if candle after closes still above indicator value.

            3. If candle after cross candle closes below the indicator, the condition is not valid

            So, I think that is exactly what you need, right?

            0_1569891385828_Auswahl_604.png

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

            1 Reply Last reply Reply Quote 0
            • E
              everjn17 last edited by

              Wait wait wait, so what do you mean is Width = 2 meaning the EA will check crossover on Candle +2 and still give a TRUE value for Candle +1 if it still above the baseline?

              T 1 Reply Last reply Reply Quote 0
              • E
                everjn17 last edited by

                Could you try your test on AUDCAD from 1st April 2019 to 30th April 2019 and use the KusKus Starlight as the confirmation like i did. Like you can just draw line when price cross and close above Kijun and Kuskus value is positive. The line should drawn on 4th April 2019 according to my logic on my brain, but i just don't know why the EA just didn't take that trade or even worst for some condition it take a Short trade on 3rd April which it shouldn't be taken since Kuskus value are switch to positive at this time.

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

                  @everjn17 said in Help me with crossover price vs custom indicator:

                  Wait wait wait, so what do you mean is Width = 2 meaning the EA will check crossover on Candle +2 and still give a TRUE value for Candle +1 if it still above the baseline?

                  Okay, example:

                  Candle ID on condition block all set to 1 (I never use 0 for entry so it's easier for me.)

                  1. EA detects a crossover auf indicator x> today (so cross over was yesterday) -> it passes condition check on orange dot.
                    2.a) Tomorrow it checks again. If price stayed above indicator -> it passes condition check on orange dot even if on the today candle there was no cross over.
                    2.b) Tomorrow it checks again. If price fell below indicator (or is equal) to indicator value -> condition not valid -> yellow dot.

                  I can do the test as requested, but maybe need your indicator settings for kuskus and kijun in order to have comparable signals.

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

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

                    @everjn17 Here you go. I just took some values - maybe default, don't know.

                    Kijun: 26 shift 0
                    KKS: 26, 0.3, 0.3

                    x> and x< width =2

                    On crossing there will be a line drawn. If KKS condition also valid, it draws a thumb up or down.

                    0_1569935029615_0cbea0bc-489a-4173-93b4-286f2e0109a3-image.png

                    a) Short trade not taken on 2nd as KKS not confirmed
                    b) No Long signal on 3rd - Don't know why.
                    c) Long signal on 4th
                    d) short signal on 24th - not confirmed by KKS
                    e) short signal on 25th - confirmed by KKS

                    So the only thing that I have no clue about is that it didn't draw a line on 3rd. Maybe there is a hidden feature we don't know yet, as there was a cross down the candle before or maybe it's a bug!?!

                    Link to project.

                    0_1569935546475_cross_width_test.mq4 MQ4

                    Here are the indicators I used:

                    0_1569935569327_Kijun-Sen.mq4
                    0_1569935594811_Kuskus_Starlight.mq4

                    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

                    S
                    E
                    A
                    M
                    T
                    M
                    A
                    E
                    K
                    J
                    J
                    G

                    20
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors