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 DanielTynera, Today, 01:14 AM
        0 responses
        2 views
        0 likes
        Last Post DanielTynera  
        Started by yertle, 04-18-2024, 08:38 AM
        9 responses
        40 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by techgetgame, Yesterday, 11:42 PM
        0 responses
        12 views
        0 likes
        Last Post techgetgame  
        Started by sephichapdson, Yesterday, 11:36 PM
        0 responses
        2 views
        0 likes
        Last Post sephichapdson  
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,615 views
        0 likes
        Last Post aligator  
        Working...
        X