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, 03:46 AM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ij001, Today, 12:57 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by shildebrand324, Today, 12:36 PM
        0 responses
        17 views
        0 likes
        Last Post shildebrand324  
        Started by traderpards, Today, 11:41 AM
        0 responses
        14 views
        0 likes
        Last Post traderpards  
        Started by johnMoss, Today, 10:12 AM
        1 response
        29 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by thaison316, 03-29-2021, 03:12 PM
        4 responses
        57 views
        0 likes
        Last Post NinjaTrader_Kate  
        Working...
        X