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 dtaylor, 08-07-2022, 09:43 PM
        4 responses
        578 views
        0 likes
        Last Post Emma1
        by Emma1
         
        Started by edward_steve12, Today, 03:23 AM
        1 response
        3 views
        0 likes
        Last Post Emma1
        by Emma1
         
        Started by joseph_kuruvilla12, Today, 01:01 AM
        1 response
        7 views
        0 likes
        Last Post Emma1
        by Emma1
         
        Started by samish18, Today, 04:01 AM
        1 response
        8 views
        0 likes
        Last Post Emma1
        by Emma1
         
        Started by greenberet, Today, 04:05 AM
        0 responses
        3 views
        0 likes
        Last Post greenberet  
        Working...
        X