Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Graphic chart dataSeries

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

    Graphic chart dataSeries

    Hello !!! i try to display dataSeries in indicator
    if i add Add(CCI(myDataSeries,14)); line after Backtest NT7 shutdown

    if i use regular Close data input works fine, dont work with any custom dataSeries


    protected override void Initialize()
    {
    CalculateOnBarClose = true;
    ExitOnClose=false;
    EntriesPerDirection=1;
    BarsRequired = 120;
    SyncAccountPosition = true;
    EntryHandling = EntryHandling.UniqueEntries;
    myDataSeries = new DataSeries(this, MaximumBarsLookBack.Infinite);
    myDataSeriesM = new DataSeries(this, MaximumBarsLookBack.Infinite);
    myDataSeriesL = new DataSeries(this, MaximumBarsLookBack.Infinite);
    myDataSeriesH = new DataSeries(this, MaximumBarsLookBack.Infinite);
    Add("$USDCHF",PeriodType.Minute, 60);

    Add(CCI(myDataSeries,14));

    }

    private IOrder entryOrder = null;
    protected override void OnBarUpdate()
    {
    myDataSeries.Set((Closes[0][0] + Closes[1][0]));



    if (CurrentBar < 120 || CurrentBars[1] < 120)
    return;
    Last edited by GainForex; 03-28-2016, 12:35 AM.

    #2
    Hello GainForex,

    Thanks for your post.

    Plotting from within a strategy is not directly supported. There is a work around however please observe the note: This technique has limited functionality. It will NOT work for charts in the Strategy Analyzer during backtesting, but it will work on real-time charts.

    Here is the reference to "Strategy: Plotting from within a NinjaScript Strategy" : http://ninjatrader.com/support/forum/showthread.php?t=6651
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    26 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, Yesterday, 09:53 PM
    2 responses
    49 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    192 views
    0 likes
    Last Post Hasadafa  
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,234 views
    0 likes
    Last Post xiinteractive  
    Working...
    X