Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with Multi Time Frame

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

    Problem with Multi Time Frame

    Hi
    I am trying to trade with 1000 and 144 Tick charts. 144 is my primary bars. No order is create at all when I insert " Add(PeriodType.Tick, 1000);".

    Could anyone advise? Thanks

    My code below :

    protected override void Initialize()
    {
    Add(LeaderOfMACD(12, 26, 9));
    Add(Stochastics(7, 14, 3));
    Add(StochasticsOverlay(7, 14, 3));
    Add(EMA(20));
    Add(PeriodType.Tick, 1000);
    SetStopLoss("", CalculationMode.Ticks, stopLossPts , false);
    SetProfitTarget("", CalculationMode.Ticks, profitPts );
    CalculateOnBarClose = true;
    }

    protected override void OnBarUpdate()
    {
    if (CrossBelow(LeaderOfMACD(BarsArray[1], 12, 26, 9), LeaderOfMACD(BarsArray[1], 12, 26, 9).Avg, 1))
    {
    boolCrossover = true ;
    }
    if (boolCrossover == true
    && CrossBelow(LeaderOfMACD(12, 26, 9), LeaderOfMACD(12, 26, 9).Avg, 1))
    {
    txtRemark = "MACD 1000 and 144 Tick Sell " + DefaultQuantity + " Contract";
    EnterShort(DefaultQuantity, txtRemark);
    boolCrossover = false;
    }
    if (Position.MarketPosition == MarketPosition.Short
    && Position.GetProfitLoss(Close[0], PerformanceUnit.Currency) > 100)
    {
    ExitShortExit Short " + Position.Quantity + " contracts");
    }

    }

    #2
    Hello,

    Thank you for your note.

    We recieved the message and someone will follow up with you at the latest Monday.

    Thank you for your patience.
    BrettNinjaTrader Product Management

    Comment


      #3
      Kevin,

      If you add another series into your strategy you will then need to filter your strategy to BarsInProgress. You will also need to ensure you actually have enough data for all bar series objects before your strategy will run.
      Josh P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

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