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

Horizontal line in indicator panel form strategy

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

    Horizontal line in indicator panel form strategy

    Good day,

    I tried to write a strategy based on one of indicators. From ninjascript i add this indicator to the chart in different panel from price data. Now i need to draw a horizontal line in indicator panel. How can i do this directly from script of the strategy?

    i tried to use drawhorizontalline() but it works only in price panel, but i need to draw in indicator panel.

    Thank you for any help.

    #2
    Welcome to our forums - you can set DrawOnPricePanel to false in the Initialize() to draw in the indicator panel - http://www.ninjatrader.com/support/h...pricepanel.htm

    You would need to do this though directly in the indicator.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      So there is no way to do it from the strategy?

      Comment


        #4
        That's unfortunately correct, no with the default Draw methods. You could draw within the indicator itself and then expose any signal info to be used in the strategy for example for triggering trades.

        BertrandNinjaTrader Customer Service

        Comment


          #5
          A little trick

          It's possible to create for instance an empty (i.e. zero based) series in the indicator and then set the actual value in the strategy like this:

          myindicator.Plot2.Set(strategySeries[0]);

          All you have to do is to create additional placeholder plots in your indicator. Then from your strategy you can set those plots to values calculated/taken from your strategy.

          Last edited by molecool; 01-04-2013, 04:22 AM. Reason: Update

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by esmall, Today, 07:14 PM
          0 responses
          9 views
          0 likes
          Last Post esmall
          by esmall
           
          Started by Option Whisperer, 05-09-2024, 07:58 PM
          6 responses
          26 views
          0 likes
          Last Post Option Whisperer  
          Started by rayyyu12, Today, 05:38 PM
          0 responses
          12 views
          0 likes
          Last Post rayyyu12  
          Started by xepher101, Yesterday, 12:19 PM
          2 responses
          30 views
          0 likes
          Last Post xepher101  
          Started by thumper57, Today, 04:30 PM
          0 responses
          8 views
          0 likes
          Last Post thumper57  
          Working...
          X