Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Use of Indicator that uses DrawOnPricePanel from Strategy is not drawing on Panel1

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

    Use of Indicator that uses DrawOnPricePanel from Strategy is not drawing on Panel1

    I’m using the d3spotter indicator. This indicator makes use of DrawOnPricePanel = false to draw over the indicator it has loaded in Panel1. Works great.
    But…

    When using the indicator from a strategy the DrawOnPricePanel = false does not seem to have any effect and the drawing takes place in the price panel instead. Actually this behavior happens only when the strategy is run on a chart. If it’s run in Strategy Analyzer and you view the chart from within SA then it’s plotting alright.
    I’ve attached screen shots, the indicator and a sample strategy that makes use of the indicator.

    The d3spotter attached is identical to the one presently on the NT forums except that after I witnessed the issue I added some calls to DrawOnPricePanel to make sure it’s set as the indicator expects and then leaves it to be set to false by the time it returns from OnBarUpdate.
    Attached Files

    #2
    Hello,

    Thank you for the post.

    I just wanted to let you know I am currently reviewing this question.

    Once I have further details on this item I will reply back here.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      When I run Playback connection and start playing it eventually straightens itself out and plots alright. But when enabling on a live connection with real time data it is not plotting correctly.... at least not at the start.

      Comment


        #4
        Any update on this?

        Comment


          #5
          Hello Brillo,

          Thank you for your patience.

          As we analyze the file can you detail why the use of DrawOnPricePanel is seen in OnBarUpdate() where it can be seen switching between true and false?

          I look forward to your response.

          Comment


            #6
            Hi Patrick,
            The indicator draws dots on the price panel as well as in Panel1 where it's added an indicator. The if the DrawOnPricePanel property is not set back and forth then the Draw.Dot api will only draw on one of the panels.
            Another way to get Draw.Dot to draw either panel is to use the overloaded version that takes a bool bDrawOnPricePanel. I had changed the code to use this instead of the property but I get the same behavior. Doesn't work from a strategy at strategy startup.

            BTW, the indicator also uses Draw.TextFixed and there's no overload for that api to specify drawonpricepanel or not so there's not choice but to use the strategy.DrawOnPricePanel property for those calls.

            Comment


              #7
              Hello Brillo,

              Thank you for your response.

              It would not be recommended to switch DrawOnPricePanel from true to false dynamically. There is no expected behavior here as the property should only be set once in SetDefaults.

              You can use two indicators to have one draw on the price panel and the other on the separate panel. Please do so and advise if the behavior you detailed in your original post is still seen.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by murjsuhes, Today, 08:13 AM
              0 responses
              1 view
              0 likes
              Last Post murjsuhes  
              Started by krpkevin, Today, 07:50 AM
              0 responses
              3 views
              0 likes
              Last Post krpkevin  
              Started by robforee2, Yesterday, 06:11 PM
              2 responses
              16 views
              1 like
              Last Post NinjaTrader_ChrisL  
              Started by minds2010, Today, 03:38 AM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by DTSSTS, Yesterday, 07:11 PM
              2 responses
              32 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X