Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

trade visualization

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

    trade visualization

    Hello,

    I can see the dashed strategy P/L lines in the chart window only when P/L is triggered. Is there a possibility to have a dashed line starting with the entry and moving with current price?

    Thanks
    Tony

    #2
    Hi Tony, it would be possible to custom code this into your strategy, but this capability is unfortunately not currently included in a standard NinjaTrader installation.
    AustinNinjaTrader Customer Service

    Comment


      #3
      No additional support for this is available but feel free to use:

      Code:
      if (Position.MarketPosition != MarketPosition.Flat)
        DrawLine("tradeLine", true,  BarsSinceEntry(), Position.AvgPrice, 0, Close[0], Position.GetProfitLoss(Close[0], PerformanceUnit.Points) >= 0 ? Color.Green : Color.Red, DashStyle.Dash, 2);
      Ryan M.NinjaTrader Customer Service

      Comment


        #4
        Ryan,

        thank you for this help!!!

        But when I add this to my strategy there occurs something strange I had never before. When I enable the strategy now then it is disabeled immediately after my enable-click. Strange. When I remove this code then I can enable strategy as usuaylly.

        What might be the strange reason for this issue with your coding?

        Best
        Tony
        Last edited by tonynt; 07-19-2011, 12:06 PM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by selu72, Today, 02:01 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by WHICKED, Today, 02:02 PM
        2 responses
        8 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by f.saeidi, Today, 12:14 PM
        8 responses
        21 views
        0 likes
        Last Post f.saeidi  
        Started by Mikey_, 03-23-2024, 05:59 PM
        3 responses
        50 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by Russ Moreland, Today, 12:54 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X