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 helpwanted, Today, 03:06 AM
        1 response
        7 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        385 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X