![]() |
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 |
|
|
#16 |
|
Senior Member
Join Date: Dec 2009
Location: Netherlands
Posts: 179
Thanks: 15
Thanked 72 times in 51 posts
|
Does the strategy make any trades at all ?
Code:
// Condition set 1
if (CrossAbove(T3(MyInput0, 3, 0.7), T3(MyInput1, 3, 0.7), 1)
&& Close[0] < Bollinger(2, MyInput2).Lower[0])
{
EnterLong(DefaultQuantity, "");
}
If the T3 crossover occurs, there's a strong uptrend and Close[0] will in most cases be in -or- above the upper range of the Bollingerbands, and not below the lower band. Therefore I suggest you increase the CrossAbove lookback period to 10 or more depending on your timeframe settings. That way, if a crossover occurs, the code will look if Close[0] goes below the lower BollingerBand for the next 10 bars, and not only at exactly the time (ie. the same bar) the crossover occurs. like this: Code:
if (CrossAbove(T3(MyInput0, 3, 0.7), T3(MyInput1, 3, 0.7), 10)
&& Close[0] < Bollinger(2, MyInput2).Lower[0])
{
EnterLong(DefaultQuantity, "");
}
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with basic SMA Crossover strategy | kemosabe | Automated Trading | 9 | 04-26-2012 12:48 PM |
| basic strategy wizard features | anniebee | Suggestions And Feedback | 1 | 07-11-2010 09:30 AM |
| Combining Basic Halt strategy with another strategy? | Ninja B | Automated Trading | 1 | 07-18-2008 01:11 AM |
| Basic TRIN strategy | alfie | Strategy Development | 4 | 05-11-2008 06:32 AM |
| basic help on program a strategy | z32000 | Strategy Development | 10 | 11-23-2007 07:59 PM |