Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reset Target Price SetProfitTarget

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

    Reset Target Price SetProfitTarget

    Should you call this method to dynamically change the target price in the strategy OnBarUpdate() method, you should always reset the target price/offset value when your strategy is flat otherwise, the last price/offset value set will be used to generate your profit target order on your next open position

    Syntax
    SetProfitTarget(double currency)
    SetProfitTarget(CalculationMode mode, double value)
    SetProfitTarget(string fromEntrySignal, CalculationMode mode, double value)

    Does this mean just to set value to 0 (zero)?

    also this did not work for me until I set the "double value" to an "int value", using CalculationModeTicks
    Last edited by gg80108; 04-09-2009, 03:17 PM.

    #2
    gg80108,

    Please see this reference sample as it may help: http://www.ninjatrader-support2.com/...ead.php?t=3222
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    217 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    133 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    147 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    233 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    192 views
    0 likes
    Last Post CarlTrading  
    Working...
    X