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 hazylizard, Today, 08:38 AM
        2 responses
        8 views
        0 likes
        Last Post hazylizard  
        Started by geddyisodin, Today, 05:20 AM
        2 responses
        18 views
        0 likes
        Last Post geddyisodin  
        Started by Max238, Today, 01:28 AM
        5 responses
        47 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by giulyko00, Yesterday, 12:03 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by habeebft, Today, 07:27 AM
        1 response
        16 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Working...
        X