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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      574 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X