NexusFi: Find Your Edge


Home Menu

 





Multi Series bug


Discussion in NinjaTrader

Updated
    1. trending_up 2,794 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 1 attachments




 
Search this Thread

Multi Series bug

  #1 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271

hi,
this is a simple Multi series indicator which prints the close of the last bar. the secondary series is of the same instrument, with a periodicity of 5 minutes.
 
Code
Add(PeriodType.Minute,5);
 
Code
protected override void OnBarUpdate()
        {
            // Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
            try
            {
                Print(Closes[0][0] + ", " + Closes[1][0]);
            }
            catch (Exception ex)
            {
                Print(ex.Message);
            }
                
        }
this works fine except for when i set the chart periodicity to 5 Minutes (same as the secondary data series). a null object error is encountered.

can anybody help me out.

thanks in advance.

Attached Files
Elite Membership required to download: dsError.zip
Started this thread Reply With Quote





Last Updated on January 21, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts