• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multicharts Strat. Error: Bars ref. value: -1

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

    Multicharts Strat. Error: Bars ref. value: -1

    I am trying to run a strategy that I create in Multicharts. It was successful just using regular easylanguage code to buy at market, sell, short, buytocover but when I substitute these commands with NT commands NTBuyMarket, NTSellMarket and NTClosePosition I get the following error when loading the charts: "Trying access to data at future. Bars reference value: -1". Here is a paste of the command I wrote for a long entry (basic ma cross):

    if
    NTConnected(1)andLastBarOnChartthenbegin
    if
    close crosses above mathenNTBuyMarket("",1)nextbar;
    end;

    #2
    Unfortunately I am not familiar with MultiCharts and the functions we have not created functions for MultiCharts so we do not guarantee their functionality. However, if its anything like EL, the function is not being used correctly.

    Here is a link to some EL sample code using our functions.

    http://www.ninjatrader-support.com/H...eStrategy.html
    RayNinjaTrader Customer Service

    Comment


      #3
      Multicharts EasyLanguage error

      Multicharts is owned by TS and uses EasyLanguage so I would think it would be compatible with Ninja. I have imported and compiled the els and eld files within the NinjaTrader Bin folder for auto trading. Everything came out fine. I am just not familiar with the error about referencing bars at past. Bars reference: -1. I will look at the function codes. I'd think a bar reference that was negative would not make sense and would be invalid. I know the script is communicating with ninja through multicharts b/c when I close ninja I get an error pop up that says could not connect or run .dll.

      Comment


        #4
        Unfortunately I am not familiar with MC and the error which is not a NinjaTrader error.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by manueldecastro, Today, 12:57 AM
        0 responses
        5 views
        0 likes
        Last Post manueldecastro  
        Started by JulieG, Today, 12:40 AM
        0 responses
        5 views
        0 likes
        Last Post JulieG
        by JulieG
         
        Started by jimjoe123, Yesterday, 09:28 PM
        2 responses
        12 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by 12VMan, 08-20-2019, 09:29 AM
        2 responses
        25 views
        0 likes
        Last Post Lancer
        by Lancer
         
        Started by tgn55, Yesterday, 09:50 PM
        0 responses
        5 views
        0 likes
        Last Post tgn55
        by tgn55
         
        Working...
        X