Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MTF Strategy SMA Typical, Rising

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

    MTF Strategy SMA Typical, Rising

    I want to compare if SMA is rising on Lower (1 Minute) and Higher Time Frames (3,5,15), but not the Close type but the "Typical" type - could anyone help me, please??

    protected override void Initialize()
    {
    SetProfitTarget("", CalculationMode.Ticks, TP);
    SetStopLoss("", CalculationMode.Ticks, SL, false);
    Add(PeriodType.Minute, 3);
    Add(PeriodType.Minute, 5);
    Add(PeriodType.Minute, 15);
    CalculateOnBarClose = false;
    }


    protected override void OnBarUpdate()
    {
    if (
    Rising(SMA(Typical, 1)) == true
    && Rising(SMA(Typical, 3)) == true
    && Rising(SMA(BarsArray[1], 3)) == true // <---- I want to check type "Typical", not type "Close"
    && Rising(SMA(BarsArray[2], 3)) == true // <---- I want to check type "Typical", not type "Close"
    && Rising(SMA(BarsArray[3], 3)) == true // <---- I want to check type "Typical", not type "Close"
    && SMA(Typical, 1)[0] > SMA(Typical, 3)[0] // <---- This I want to check on higher TF, too, but how with type "Typical" ????
    && Rising(EMA(13)) == true
    && Rising(SMA(20)) == true
    && Rising(SMA(50)) == true
    && EMA(13)[0] > SMA(20)[0]
    && (EMA(BarsArray[1], 13))[0] > (SMA(BarsArray[1], 20))[0]
    && (EMA(BarsArray[2], 13))[0] > (SMA(BarsArray[2], 20))[0]
    && Position.MarketPosition == MarketPosition.Flat
    && (Opens[3][0] < Closes[3][0])
    && Low[0] <= EMA(13)[0] + 1 * TickSize
    )
    {
    EnterLong(DefaultQuantity, "");
    }
    }

    #2
    resist, instead of pointing to the BarsArray for the series to 'grab' for calculation, you can just use Typicals for your task - http://www.ninjatrader.com/support/h...7/typicals.htm

    Comment


      #3
      SMA typical + only 1 trade each bar

      Thank you!!!!

      I m not sure if the result will be the same.
      I want to check
      if the SMAs(Typical, 1 and 3) of the HigherTimeFrames are Rising.
      I´m wondering if it´s enough to check that the SMAs of the HTFs are rising at all, calculated "Standard".


      Additional question.
      I want my strategy only to make one trade each bar.
      I put in the Variables area "private int Notrade" and condition is checked:

      if Notrade != CurrentBar
      {
      EnterLong(DefaultQuantity, "");
      Notrade = CurrentBar;
      }

      but strategy opens (COBC false) after Takeprofit a new trade in same bar - that´s not wanted. What can I do

      Comment


        #4
        Do you mean, you're not sure if using Typical would make a noticeable difference in your results? Only testing could tell you that.

        In which BarsInProgress do you run this check and entry point?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        666 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        377 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X