![]() |
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Sep 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
Can I overide " exit on close" so my position stays open until the trade plays out ?
I'm trying automation in Forex on a demo and want the position open over the course of days or weeks . |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,327
Thanks: 92
Thanked 354 times in 345 posts
|
Please see the following link for more information.
http://www.ninjatrader-support.com/H...itOnClose.html If set to true, strategy will not exit on close.
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Sep 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
I see , Just shut it off when applying the strategy , thanks .
Also , how do I set a trailing stop . I got as far as stops and targets / strategy action in the wizard and selected trailing stop . From the parameters box how do I define how to trail the stop ? Thanks again I appreciate it . |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,327
Thanks: 92
Thanked 354 times in 345 posts
|
Please see the link below for more information regarding SetTrailStop().
http://www.ninjatrader-support.com/H...TrailStop.html
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Sep 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
Can I set the parameters to trail the stop from the wizard ?
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Trailing stops are available on the last page of the Wizard where you define Stops & Targets.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Sep 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
If I backtest the 12/08 ES contract and run the backtest from 8/08 through 1/13/09 will it factor in the 9/08 and 3/09 contract for the results .
|
|
|
|
|
|
#8 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
With NT 6.5 or earlier, if you have merged past contracts into 12/08 then yes, otherwise no.
More info on merging - http://www.ninjatrader-support.com/H...eV6/Merge.html
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Member
Join Date: Sep 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks for that Ray. I made a mistake with that last question though . If I run a backtest for the 03/09 ES contract ( or another contract ) and choose a timeframe from around 01/08 ,or before the 03/09 contract trades, until today will the result be based upon the ES contracts that expired up until the 03/09 contract ?
Is there a maximum timeframe to look back ? Also , I dont store any real time bar data and am getting the data to backtest from Esignal . Is there anything I should do that I might be missing ? |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,327
Thanks: 92
Thanked 354 times in 345 posts
|
The same answer holds up; if you did not merge the 12-08 contract or prior contracts into the 03-09 contract, it will not.
The Strategy Analyzer does not have a limitation regarding look back period. I suggest to create a continuous contract, since these are supported with eSignal. Go to Tools-->Instrument Manager, highlight the ES and set Expiry to ##-##. Add the ES to your instrument list. I suggest to use this instrument upon backtesting.
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Member
Join Date: Sep 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks again , I'll do that .
|
|
|
|
|
|
#12 |
|
Member
Join Date: Sep 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
When I apply conditions and actions how do I tell the condition builder the MACD must be falling or rising ?
On the right side I see rising , falling and slope but how can I apply these ? |
|
|
|
|
|
#13 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
Starrynight, please see the attached sample strategy for a way to tell the Condition Builder the MACD is rising, you can express it as MACD is greater than the MACD from 5 bars ago.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exit On Close | TraderGuy | Strategy Development | 15 | 01-07-2009 02:10 AM |
| 'Exit on Close' in Strategy Wizard | Elliott Wave | Strategy Development | 1 | 05-07-2008 10:14 PM |
| Time to flatten vs. Exit on close | dtf139 | Automated Trading | 1 | 01-11-2008 07:11 AM |
| Exit On Close doesn't work fine | MrBaffalo | General Programming | 6 | 11-30-2007 06:18 AM |
| Profit Targets & 'Exit on Close' | dgregor5 | General Programming | 2 | 07-15-2007 01:35 PM |