Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MultiTimeframe Strategy Indicator disappears

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

    MultiTimeframe Strategy Indicator disappears

    Hi, this is my script so far but doesnt work, im trying to use 2 Timeframes, BarArray[0] as the deffault and a 240mintes as BarArray[1]




    protected override void Initialize()
    {

    _HA = KBT_HeikenAshi_Naked_v1( Closes[0], haPeriods, haType );
    Add ( _HA );

    Add(PeriodType.Minute, 240);
    _SF = KBT_SuperFrame_ANA_Naked_V2( Closes[1] , filterLineOffset , myType , spLength , spMultiplier );
    Add ( _SF );
    }


    protected override void OnBarUpdate()
    {


    if ( CurrentBars[0] <= (haPeriods * 2 ) || CurrentBars[1] <= spLength ) return;
    {

    if (BarsInProgress != 0)
    return;

    //Entry code

    }

    but the indicators get both applyed to the default 15 mnt timeframe, any help please?

    Thanks in advance.
    Last edited by kabott; 11-12-2018, 11:08 AM.

    #2
    Hello kabott,

    Thanks for your post.

    The additional data series would not be properly referenced in Initialize().

    I may suggest to take an approach similar to the SampleStrategyPlot example to have plots added to the strategy and to assign those plots with the indicator value on BarsInProgrress == 0 iterations.

    I'll include a link and a modified example to demonstrate using SMA's.

    Plotting from a NinjaScript Strategy - https://ninjatrader.com/support/help..._a_ninjasc.htm

    Please let us know if you have any additional questions.

    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    134 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    75 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    119 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    114 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    92 views
    0 likes
    Last Post CarlTrading  
    Working...
    X