![]() |
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 Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2009
Posts: 52
Thanks: 0
Thanked 0 times in 0 posts
|
Hi, within Condition Builder in Edit Strategy, I am trying to run 3 indicators each with its own long/short position so that the strategy is the combined outcome of the 3 indicators.
So if indicator 1 = 1 long, indicator 2=1 long and indicator 3=1 long, i want a net position of 3 long. When indicator 3 changes to 1 short, my Enter short position in Condition Builder forces the strategy to then go net 1 short instead of net 1 long (since indicator 1 and indicator 2 haven't changed). I am using Enter long position and the Enter short position in Condition builder for each of the indicators and the indicators go from Long to Short with no flat position. Is there another buy or sell command i can use that only affects the indicator involved? |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
anothertoy,
A strategy does not differentiate between where your positions come from. There is one overall strategy position and if you go EnterShort() from a long strategy position it will close that long position and then get you into a short position. If you do not want this and just want to close one long, submit ExitLong() instead of EnterShort() when you know you are already long.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: May 2009
Posts: 52
Thanks: 0
Thanked 0 times in 0 posts
|
thanks but the problem with an exitlong or exit short, is that the indicator concerned will have a flat position but i want it to have the opposite position.
can i backtest a portfolio of strategies? |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
You cannot view each indicator as having its own position. A strategy has one position and you need to manage your orders based on that position. If you want to sell 2 then you need to close two of your original enter longs. You can run three separate strategies in three separate backtests and save the results, but you will need to aggregate results yourself with Excel.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: May 2009
Posts: 52
Thanks: 0
Thanked 0 times in 0 posts
|
On a related note, will ninjatrader cope adequately with 40 separate strategies running at the same time if i split each indicator into a separate strategy to get around the position issue? i have a dual core intel 2.13ghz computer with 4gb of ram.
Or should i spend some time trying to cut down the number of strategies being run concurrently? These strategies are being run on minimum 45min "close of bar" data and not tick data. |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
You can try it. It is highly dependent on how CPU intensive your algorithms are and how much historical data you are loading per strategy. Obviously less system load is better.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Plots under Parameter in Condition Builder | dwt1020 | General Programming | 4 | 04-10-2009 08:01 AM |
| Possible Condition Builder Bug | Elliott Wave | Strategy Development | 1 | 11-14-2008 10:59 AM |
| Help with Condition builder | designer | Strategy Development | 14 | 10-30-2008 11:02 AM |
| Need help with Condition Builder | amberwest | Strategy Development | 19 | 08-13-2008 03:09 PM |
| Condition Builder | OUFan | Strategy Development | 6 | 12-19-2007 02:05 PM |