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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X