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 rocketman7, Today, 02:12 AM
        5 responses
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by ZenCortexReal, Today, 08:54 AM
        0 responses
        1 view
        0 likes
        Last Post ZenCortexReal  
        Started by ZenCortexReal, Today, 08:52 AM
        0 responses
        0 views
        0 likes
        Last Post ZenCortexReal  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        7 responses
        28 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by samish18, 04-17-2024, 08:57 AM
        17 responses
        66 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X