• 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

Odd error in Strategy Analyzer - ChartControl

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

    Odd error in Strategy Analyzer - ChartControl

    Hi,
    I've got an odd error for you. I've got an exception in the Strategy Analyzer from the following piece of code. I know it is from this line because of the debugging Print statements either side.

    if (DEBUG)
    Print("debug point 2");
    // the following causes a crash inside the Strategy Analyzer
    if (ChartControl != null)
    col = dir > 0 ? ChartControl.UpColor : ChartControl.DownColor;
    if (DEBUG)
    Print("debug point 3");

    And here is the error it creates (output from OutputWindow):
    ...
    ...
    debug point 2
    **NT** Error on calling 'OnBarUpdate' method for strategy 'grGoldChannelTrader4/8f57ba04d2e5494cb2163c8c88fb1098': Index was outside the bounds of the array.

    Good luck with this. I don't know which array it is referring to
    saltminer

    #2
    Hello,

    Thanks for the note.

    If you take the chart control references out does it still have issue? Meaning just plug in some random colors here.

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      Yes, I replaced it with
      col = dir > 0 ? Color.LimeGreen : Color.Red;

      No errors now.

      saltminer

      Comment


        #4
        Hello,

        In this case you would be good to go.

        Unfortunately we dont support anything in ChartControl. Therefor it is possible something could be changed in this area or not work as you expect.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Re further assistance;
          Is there another way to determine if a strategy is running without a chart, e.g. in Strategy Analyzer or on the Control Centre?

          Is there a way for an indicator to determine the same thing? e.g. Market Analyzer

          Then I can skip examining ChartControl.

          Thanks,
          saltminer

          Comment


            #6
            Hello,


            Thank you for your note.



            Unfortunately there is no supported methods to do this.


            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by victorsmith, Today, 02:23 PM
            1 response
            2 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by juju075, Today, 02:04 PM
            0 responses
            4 views
            0 likes
            Last Post juju075
            by juju075
             
            Started by FiftyFib FX, Today, 01:45 PM
            0 responses
            3 views
            0 likes
            Last Post FiftyFib FX  
            Started by researcher247, Today, 01:21 PM
            3 responses
            5 views
            0 likes
            Last Post NinjaTrader_Tyler  
            Started by sandman, Today, 12:33 PM
            3 responses
            15 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X