Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Internal MARKET

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

    Internal MARKET

    I'm trying to make simple operations with the data of ^ UVOL and ^ DVOL but for some reason this results do not appear, if someone can tell me what to do, thanks

    protected override void Initialize()
    {
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    Overlay = false;
    Add("^UVOL", PeriodType.Minute, 5);
    Add("^DVOL", PeriodType.Minute, 5);

    }


    protected override void OnBarUpdate()
    {
    a=Closes[1][0];
    b=Closes[2][0];
    c=a/b;
    Plot0.Set(c);
    }
    Attached Files

    #2
    Hello markaiser,

    Are you able to load these symbols on a chart directly over the same time period?

    There are no CurrentBar checks..

    Are you getting index errors on the Log tab of the Control Center when reloading the script on a chart?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea B,

      Regarding your question;
      1.- Yes, I can load these symbols at the same time period. I save all historic data in order to run market replay
      2.- I'm getting index error on the log tab; Error on calling 'OnBarUpdate' method for indicator 'Internal1' on bar 0: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.



      3.- CurrentBar checks?, I added this line if(CurrentBars[0] > 20), but still got the same error

      protected override void OnBarUpdate()
      {
      if(CurrentBars[0] > 20)
      a=Closes[1][0];
      b=Closes[2][0];
      c=a/b;
      Plot0.Set(c);
      }

      [ATTACH=JSON]{"data-align":"none","data-size":"medium","data-attachmentid":1044037}[/ATTACH] ​​​​​​​
      Attached Files

      Comment


        #4
        The internal market of the European Union (EU) is a single market in which the free movement of goods, services, capital and persons is assured, and in which citizens are free to live, work, study and do business.
        Last edited by Setzer5; 10-13-2019, 04:46 AM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        939 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        7 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        4 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        33 views
        0 likes
        Last Post wzgy0920  
        Working...
        X