![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Feb 2008
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
|
I used SetStopLoss with the ticks mode in my strategy and it worked in backtesting e-mini future contracts.
However, when I change to either price or percentage mode, the stop loss order did not seem to be placed. Does the price or percentage mode work for future contracts? I must add that I enter at the same timeframe but exit at a longer timeframe: From 1 min: EnterShort(0, firstHalf, "FirstHalf"); From 15 min: ExitShort(0, firstHalf, "ExitFirstHalf", "FirstHalf"); Seperately, if I enter two orders for scaling out, should I call SetStopLoss once without specifying the signal name or call it twice: SetStopLoss(CalculationMode.Price, 1321); or SetStopLoss("FirstHalf", CalculationMode.Price, 1321, false); SetStopLoss("SecondHalf", CalculationMode.Price, 1321, false); Thanks!
Last edited by ooppie; 06-24-2008 at 10:26 PM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
For scaling out this reference sample may be of use: http://www.ninjatrader-support.com/v...ead.php?t=3751
In terms of CalculationModes they should all work. Please see the Control Center logs for any messages. Also please use TraceOrders = true to debug the orders. I suspect maybe they are getting cancelled via invalid stop price? TraceOrders will tell you in the Output Window if this is the case.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SetStopLoss Question... | fxRichard | Automated Trading | 3 | 06-02-2008 04:50 PM |
| SetStopLoss | thepcmd | Strategy Development | 2 | 12-01-2007 01:14 PM |
| SetStopLoss() and SetProfitTarget() | SamIam | Strategy Development | 9 | 09-05-2007 08:49 PM |
| SetStopLoss Question | aethelwulf | General Programming | 3 | 07-03-2007 04:00 PM |
| setstoploss order from TS 8.1 | ppreal | Automated Trading | 15 | 12-20-2006 07:46 AM |