Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Separate Profit & Loss settings for longs and short?

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

    Separate Profit & Loss settings for longs and short?

    You can put these statements into the Initialize method:

    SetProfitTarget(CalculationMode.Ticks, ProfitTargetTicks);
    SetStopLoss(CalculationMode.Ticks, StopLossTicks);

    this would apply to longs and shorts.

    What would I need to do to have separate settings for longs and short?

    I tried the following and got errors:

    if (Position.MarketPosition == MarketPosition.Long) {
    SetProfitTarget(CalculationMode.Ticks, ProfitTargetTicksLong);
    SetStopLoss(CalculationMode.Ticks, StopLossTicksLong);
    }

    if (Position.MarketPosition == MarketPosition.Short) {
    SetProfitTarget(CalculationMode.Ticks, ProfitTargetTicksShort);
    SetStopLoss(CalculationMode.Ticks, StopLossTicksShort);
    }

    Thx.

    #2
    Hi Brooks, the easiest way would be naming your long and short entries differently and then tagging a different stoploss and target to each, as example you can check into the Verwoort strategy we have in the sharing adding scaleouts as well at different levels - http://www.ninjatrader.com/support/f...N&pp=15&page=2

    Comment


      #3
      I get it. Naming the entries and allowing those names to be used with Set... statements is powerful. Thanks Bertrand.

      (You folks give wonderful support. Who else answers questions on weekends - much less holiday weekends?)

      Originally posted by NinjaTrader_Bertrand View Post
      Hi Brooks, the easiest way would be naming your long and short entries differently and then tagging a different stoploss and target to each, as example you can check into the Verwoort strategy we have in the sharing adding scaleouts as well at different levels - http://www.ninjatrader.com/support/f...N&pp=15&page=2
      Last edited by brooksrimes; 09-06-2010, 05:51 AM. Reason: added compliment

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      55 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      142 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      276 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X