![]() |
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2009
Posts: 60
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I have created my first strategy and see some results, but I have not set the ProfitTarget and Stoploss correctly so I get skewed figures. How do I set the ProfitTarget to (opening price + 37 points) and StopLoss to (opening price - 10 points)? Thanks, |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
In the Initialize() method please use SetProfitTarget(CalculationMode.Ticks, 37) and SetStopLoss(CalculationMode.Ticks, 10). Please see these articles: http://www.ninjatrader-support.com/H...fitTarget.html
http://www.ninjatrader-support.com/H...tStopLoss.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Member
Join Date: Mar 2009
Posts: 60
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
I have tried this before, but it does not have the desired effect. The entries are being opened and closed the same second. If I use percentage, it does resemble what I want, but not with points. So for the DJIA I am able to say ProfitTarget is .5% and TrailingStopLoss .17 and that works! So for a position opened at 7450, I would get a profittarget of 7487 and trailing stoploss of 7438. Want I want is if I buy the DJIA at 7450, then I want the ProfitTarget to be 7487 and the trailing stoploss to be 7440. I hope I am making some sense :-) Regards |
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Ticks are not points depending on your instrument. You need to do the math to figure out what would equate to the points.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Mar 2009
Posts: 60
Thanks: 0
Thanked 0 times in 0 posts
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Startegy involving previous day close price and current open price | kirankksimon | General Programming | 3 | 03-11-2009 08:59 AM |
| Does OnOrderUpdate() report every price change while an order is open? | tradefaz | General Programming | 1 | 08-27-2008 10:34 PM |
| Phantom price spikes with open tick? | mazachan | Charting | 12 | 04-29-2008 09:55 PM |
| Open market price with Tick data | skynetman | Strategy Development | 1 | 04-15-2008 07:03 PM |
| Need Help with plotting line at the open price on the hour | dpanglin | Indicator Development | 5 | 01-18-2008 10:33 AM |