Announcement

Collapse
No announcement yet.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    151 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    304 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    175 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X