Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need 3 days signal

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need 3 days signal

    Hello,


    I made two strategy's and converted them into indicators which I entered in the MA.
    Those strategy's are activated on 1 bar, and do not give a signal 3 days after the signal came up.
    What i want to achieve is that i want to see a Buy signal, 3 days after the signal appeared.

    can i do this in the MA or do i need to change something in the strategy?

    Best regards,

    Bas
    Last edited by Inter20; 02-27-2014, 03:12 AM.

    #2
    Hi Bas, you mean you would want to delay the signals given by your code? That is then something that would need to be achieved in the code itself, the MA would not have such a signal delay option itself.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,

      That is correct, I want to get the signal on day 1, but also the upcoming 2 days to come. So when i get a buy signal on Monday, i would still see that signal on Tuesday and Wednesday.

      Only i'm not entirely sure how to add this into the Strategy, something with bars to look back?

      Comment


        #4
        That would depend on your conditions used, for a simple cross above / below you could work for example with the bars to look back to express 'holding' the signal longer, since the cross then would also be shown if it had happend longer ago and not just the last bar basically -

        if (CrossAbove(Close, SMA(20), 3))...

        For more complex conditions you could also keep track of the bar number (CurrentBar) that generated the signal, then you would know when to reset your signal comapring to the currently evaluated OnBarUpdate() bar.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          When i look at the indicator code I cannot find the line you wrote for the strategy, im wondering if i can direcly edit the indicator code number to 3 days from this posted below:

          Value.Set(0);

          // Condition set 1
          if (CrossAbove(Stochastics(7, 14, 3).K, Stochastics(7, 14, 3).D, 14)
          && Stochastics(7, 14, 3).D[0] < 20)
          {
          DrawArrowUp("My up arrow" + CurrentBar, true, 0, Low[0] + -3 * TickSize, Color.Lime);
          SendMail("Stochastic Alert", "Bas", "[email protected]", "Buy signal Stochastic crossed below 20");
          Value.Set(1);
          }

          // Condition set 2
          if (CrossBelow(Stochastics(7, 14, 3).K, Stochastics(7, 14, 3).D, 14)
          && Stochastics(7, 14, 3).D[0] > 80)


          Best regards,

          Bas
          Last edited by Inter20; 03-09-2014, 02:06 PM.

          Comment


            #6
            That was just an example I picked here Inter20, you could change you lookback for the Cross conditions as well, currently you do 14 bars here.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Max238, Today, 01:28 AM
            2 responses
            26 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by Shansen, 08-30-2019, 10:18 PM
            25 responses
            949 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            8 responses
            41 views
            0 likes
            Last Post JonesJoker  
            Started by timko, Today, 06:45 AM
            0 responses
            4 views
            0 likes
            Last Post timko
            by timko
             
            Started by Waxavi, 04-19-2024, 02:10 AM
            2 responses
            39 views
            0 likes
            Last Post poeds
            by poeds
             
            Working...
            X