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.

    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.

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            71 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            43 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            25 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            28 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            56 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X