• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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, 10: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
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by swcooke, Today, 09:09 AM
    0 responses
    1 view
    0 likes
    Last Post swcooke
    by swcooke
     
    Started by Uregon, Today, 09:08 AM
    0 responses
    3 views
    0 likes
    Last Post Uregon
    by Uregon
     
    Started by Induna, Today, 08:44 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by TangoTX, Today, 08:36 AM
    1 response
    1 view
    0 likes
    Last Post NinjaTrader_Tyler  
    Started by abdullah, 11-15-2017, 08:44 PM
    11 responses
    822 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X