![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Junior Member
Join Date: Jun 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
Been playing with ninja for awhile but just recently got around to messing with the strategy tester. I wanted to know if there was a way, for example, to end trading once $x profit was hit? I see you can set it to cap each trade at a certain profit as an exit strategy, however I am not able to figure out how to just have it use a dollar amount as a trading end time. Thanks for any help |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Please check out these reference samples: http://www.ninjatrader-support.com/v...ead.php?t=4084
http://www.ninjatrader-support.com/v...ead.php?t=4804
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you very much Josh, I will take a look at those and see if I can figure them out.
I have another question in the meantime however. I am trying to get an exit strategy working, and not having much luck. It's basic, when the close of a bar is 10 ticks higher than the sma, close the short, when close is 10 ticks lower than the sma, close the long. I have only been using the wizard until now, as this is very new to me, and have tried quite a few times to get it working, but not working quite right yet. I have tried when close +10 < sma then exit, and close -10 > sma then exit, not quite right also tried close +10 crosses under sma etc still not working. I am using the offset field as it's the only place i see where I might add those 10 ticks, and have tried on both the close parameter and the sma parameter. Also tried setting the offset as price instead of ticks. I can give exact details if you need them, as to the example where it's not working, but hopefully you know what I am doing wrong without alot more detail (you seem to know your stuff so I am sure you are already typing ) Thanks again! |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
You want to do it like these screenshots. For the Exit order you want to match it to your entry order's signal name.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
Josh,
That is exactly how I had it, but it was exiting incorrectly. Also, the example you gave was for exiting the short, but you had +10 offset. If I wanted the short exited only when the close price was 10 ticks above the sma, wouldn't I have to subtract 10 ticks from the close price in order to get this? Also, the setting for exiting long, the offset would be opposite right? |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
It depends what you want. Take a calculator to both sides and determine what you want in terms of + or -.
Please describe why you feel it is exiting incorrectly? The picture I have shown will exit the short position if the closing price is 10 ticks above the SMA value. Let us say the close price is 100 and the SMA price is 99.99 right now. According to our example 100 + 0.10 = 100.1. That is > 99.99 so we will exit short. Your orders will exit/enter exactly whenever your condition evaluates to true. It is easiest just to use a calculator and run through some examples by hand with pen and paper to see exactly what values and how your conditions interact.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jun 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Josh,
For some reason, I didn't change a thing but now it is working correctly. The platform did get laggy on me last night and actually ended up crashing and I had to start it up again. Maybe it was just a fluke with the platform. Anyhow, thanks for your help, I had it correct the entire time but apparently the strat tester just wasn't running properly at the time. Thanks for the wonderful support! |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Profit target reached, how to stop strategy? | eb486 | Automated Trading | 3 | 06-05-2008 09:31 AM |
| Strategy: Monitoring Stop-Loss and Profit Target Orders | NinjaTrader_Josh | Reference Samples | 0 | 02-23-2008 11:15 PM |
| Ending Ninjascript strategy | jlm0@infionline.net | General Programming | 50 | 11-14-2007 10:59 PM |
| Strategy: Modifying the price of stop loss and profit target orders | NinjaTrader_Josh | Reference Samples | 0 | 09-06-2007 12:46 PM |
| Strategy Wizard and variable Profit Target | scjohn | Strategy Development | 1 | 06-21-2007 07:16 AM |