Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multi-time frame issue

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

    multi-time frame issue

    Good morning, following the guide of the web page: https://ninjatrader.com/support/help...nstruments.htm

    I have the following code which gives me error in the output format:

    AddDataSeries ("M6E 06-17", Data.BarsPeriodType.Volume, 160, Data.MarketDataType.Last);

    AddDataSeries ("M6E 06-17", Data.BarsPeriodType.Day, 1, Data.MarketDataType.Last);

    Double volumeClose = Closes [0] [0];
    Double dayClose = Closes [1] [0];

    Print ("first bar of 160 volume:" + volumeClose);
    Print ("first bar of day:" + dayClose);

    To show it in window I get the following:

    Panic: Log text '{0}' {1} ': Error calling' {2} 'method: {3}' can not be formatted


    Debugging the code I have realized that it is for this line in particular:

    Double dayClose = Closes [1] [0]

    I understand that in this position must be the value of the first candle of the dates of the day.

    Can you tell me how to get the value I'm looking for?

    Thank you.

    #2
    Hello jarronis, and thank you for your question. Please note that C# is a very case sensitive language. Double and double do not refer to the same thing. You will need to change your code so that you are using, for instance, double instead of Double. Please make this change and come back if there are any other questions we can answer.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hello Jessica, thanks for your quick response, I've always had it in double not in Double, I still have the same problem:

      Panic: Log text '{0}' {1} ': Error calling' {2} 'method: {3}' can not be formatted

      Comment


        #4
        Thank you for this additional information jarronis. Would it be possible to send us a stripped down copy of your NinjaScript which produces this behavior?
        Jessica P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kazisl, Today, 06:41 PM
        0 responses
        2 views
        0 likes
        Last Post kazisl
        by kazisl
         
        Started by einstein, Today, 06:20 PM
        0 responses
        2 views
        0 likes
        Last Post einstein  
        Started by op1031, Today, 05:51 PM
        0 responses
        4 views
        0 likes
        Last Post op1031
        by op1031
         
        Started by nighttrader99, Today, 04:34 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by Simon Investimens, Today, 02:51 PM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X