• 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

HorizonalLine Type Check

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

    HorizonalLine Type Check

    Please see the inconsistencies is the global horizontal lines between a strategy running on one chart tab (tab 1 window 1) and an indicator running on another chart tab (tab 1 window 2). The global lines are not drawn on either chart running a script (either tab 1's), they are drawn on tab 2 of window 1.

    This appears to be incorrect.

    Thanks for your assistance.

    Code:
      
     foreach (IDrawingTool draw in DrawObjects)
     {
     Print(string.Format("Found IDrawingTool: tag={0} global={1} type={2} isdrawingtoolsline={3} isdrawingtoolshorizontalline={4}"
    , draw.Tag
    , draw.IsGlobalDrawingTool
    , draw.ToString()
     , draw is DrawingTools.Line
    , draw is DrawingTools.HorizontalLine)); 
     } 
    
      
     From a running strategy:
     
    Found: [email protected]_line_2 global=True type=NinjaTrader.NinjaScript.DrawingTools.HorizontalLine isdrawingtoolsline=False isdrawingtoolshorizontalline=False
    Found: [email protected]_line_3 global=True type=NinjaTrader.NinjaScript.DrawingTools.HorizontalLine isdrawingtoolsline=False isdrawingtoolshorizontalline=False
    Found: [email protected] Line 9 global=True type=NinjaTrader.NinjaScript.DrawingTools.HorizontalLine isdrawingtoolsline=False isdrawingtoolshorizontalline=False
    
    From a running indicator:
    
    Found IDrawingTool: [email protected]_line_2 global=True type=NinjaTrader.NinjaScript.DrawingTools.HorizontalLine isdrawingtoolsline=True isdrawingtoolshorizontalline=True
    Found IDrawingTool: [email protected]_line_3 global=True type=NinjaTrader.NinjaScript.DrawingTools.HorizontalLine isdrawingtoolsline=True isdrawingtoolshorizontalline=True
    Found IDrawingTool: [email protected] Line 9 global=True type=NinjaTrader.NinjaScript.DrawingTools.HorizontalLine isdrawingtoolsline=True isdrawingtoolshorizontalline=True

    #2
    Hello hemlock,

    Thank you for your report.

    So I may reproduce this as you are, can you provide the lines of code to draw the horizontal lines from the strategy and the indicator?
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Hi Patrick, They are manually drawn lines so there is no code.

      Comment


        #4
        I see what you mean now. Thank you, hemlock.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Using your code I see both the strategy on window 1 tab 1 and the indicator on window 2 tab 1 showing the horizontal line on window 1 tab 2 as global:

          From the Strategy:
          Found IDrawingTool: [email protected] Line 1 global=True type=NinjaTrader.NinjaScript.DrawingTools.Horizont alLine isdrawingtoolsline=True isdrawingtoolshorizontalline=True
          From the Indicator:
          Found IDrawingTool: [email protected] Line 1 global=True type=NinjaTrader.NinjaScript.DrawingTools.Horizont alLine isdrawingtoolsline=True isdrawingtoolshorizontalline=True
          Patrick H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by w0lverine, Today, 08:22 PM
          0 responses
          1 view
          0 likes
          Last Post w0lverine  
          Started by dkbyond, Today, 04:11 PM
          0 responses
          5 views
          0 likes
          Last Post dkbyond
          by dkbyond
           
          Started by markus3500, Today, 03:29 PM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_EricB  
          Started by bohenriksen, Today, 04:00 AM
          1 response
          21 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by brett0, Today, 12:33 PM
          3 responses
          17 views
          0 likes
          Last Post marcus2300  
          Working...
          X