Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add Plot Strategy

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

    Add Plot Strategy

    Hello,

    I have in an indicator plotting a horizontal line working ok with

    AddPlot(Brushes.Orange, "LineStyle"); and assigning a double to LineStyle[0] in the code of the indicator for plotting.

    When I do the same in a strategy it is not plotting the horizontal line. Why please?


    Thank you!
    Tony

    #2
    Hi tonynt, thanks for your note.

    A plot should work the same in a strategy as is does in an indicator. Did you add the public property "LineStyle" that returns Values[0][0]? What if you just set Values[0][0] to the double? Please also check the log tab of your control center for errors.

    I look forward to hearing of your results.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. So with this information that it has to work same as in an indicator I started new and I could make it plotting with same logic as in the indicator. But I do not have the price of the lineplot on priceaxis on the right which my indicator does. What I see is that the programmer has in the indicator added
      DrawOnPricePanel = true;
      DrawHorizontalGridLines = true;
      DrawVerticalGridLines = true;
      PaintPriceMarkers = true;
      ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;

      I thought this might be the reason why it shows the price in the indicator on price-axis on the right but when I add these lines same as in the indicator to state.setdefaults then I get error messages for horizontal and vertical grid lines and paintpricemarkers when compiling.

      Thank you!
      Tony

      Comment


        #4
        Hi tonynt, thanks for your reply.

        A plot added by a strategy will not have a price marker. See this example on plotting from a NinjaScript strategy for more flexibility with plots such as plotting from other panels:
        https://ninjatrader.com/support/help..._a_ninjasc.htm

        Best regards.


        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Jeremytang, 07-14-2018, 06:45 PM
        21 responses
        439 views
        0 likes
        Last Post mav8rick  
        Started by LeonK, Yesterday, 09:26 PM
        1 response
        8 views
        0 likes
        Last Post bltdavid  
        Started by NicholasJoannette, Yesterday, 03:01 PM
        2 responses
        12 views
        0 likes
        Last Post NicholasJoannette  
        Started by rach1994, Yesterday, 12:20 PM
        1 response
        35 views
        0 likes
        Last Post bltdavid  
        Started by litamm89, Yesterday, 11:00 AM
        5 responses
        22 views
        1 like
        Last Post rafael_delima86  
        Working...
        X