Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Waxavi, Today, 02:10 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        4 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        4 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X