![]() |
|
|||||||
| 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: Aug 2010
Posts: 43
Thanks: 0
Thanked 0 times in 0 posts
|
When i open a chart, choose a strategy and enable it, i dont get any fills?
Whats might be the problem? |
|
|
|
|
|
#2 | |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello sosMsos,
Quote:
If you want to test a basic strategy, use the provided SampleMACrossOver, and make sure PlotExecutions are enabled in the right click > Data Series screen. This should generally produce trades and show fills on the chart.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
|
#3 |
|
Member
Join Date: Aug 2010
Posts: 43
Thanks: 0
Thanked 0 times in 0 posts
|
ya executions are plotted.
What dos this mean:
Here the strategy: #region Using declarations using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Xml.Serialization; using NinjaTrader.Cbi; using NinjaTrader.Data; using NinjaTrader.Indicator; using NinjaTrader.Gui.Chart; using NinjaTrader.Strategy; #endregion // This namespace holds all strategies and is required. Do not change it. namespace NinjaTrader.Strategy { /// <summary> /// Enter the description of your strategy here /// </summary> [Description("trendfollow2minchart")] public class trendfollow2minchart : Strategy { #region Variables // Wizard generated variables // User defined variables (add any user defined variables below) #endregion /// <summary> /// This method is used to configure the strategy and is called once before any strategy method is called. /// </summary> protected override void Initialize() { Add(PeriodType.Day, 1); //Add("^TICK", PeriodType.Minute, 1); Add(RSI(4, 0)); Add(RSI(9, 0)); Add(EMA(21)); Add(EMA(55)); Add(EMA(200)); Add(ATR(14)); CalculateOnBarClose = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { // Condition set 1 if (EMA(BarsArray[1], 21)[0] > EMA(BarsArray[1], 55)[0] && EMA(BarsArray[1], 55)[0] > EMA(BarsArray[1], 200)[0] && EMA(BarsArray[1], 55)[0] > EMA(BarsArray[1], 55)[1] && EMA(BarsArray[1], 200)[0] > EMA(BarsArray[1], 200)[1] && CrossBelow(RSI(4, 0).Avg, 30, 1)) { if (BarsInProgress == 0) EnterLong(DefaultQuantity, ""); } // SetStopLoss("",CalculationMode.Ticks, (ATR(14)[0]) * (250), false); // Condition set 2 if (CrossAbove(RSI(9, 0).Avg, 70, 1)) { ExitLong(""); } // Condition set 3 if (CrossBelow(RSI(4, 0).Avg, 78, 1)) { ExitLong(""); } // Condition set 3 if (CrossBelow(RSI(9, 0).Avg, 30, 15) && CrossAbove(RSI(9, 0).Avg, 45, 1)) { ExitLong(""); } } #region Properties #endregion } } |
|
|
|
|
|
#4 | |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Quote:
If you are adding daily series to your strategy, you should look at the amount of data loaded on the chat to make sure there is enough. Check this in the Right Click > Data Series screen. Check log tab of control center for any error messages. In order to track what your strategy is doing, you can debug with Print() statements and TraceOrders output. Use plenty of Print() statements to verify values are what you expect. Add TraceOrders = true to your Initialize method and you can then view output related to strategy submitted orders through Tools > Output window. It may also help to add drawing objects to your chart for signal confirmation. Additional help for these items is available at the following links: Debugging your NinjaScript code. TraceOrders Drawing Objects.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Market Replay Fills vs Live Real Money Fills | Lusitano | Strategy Development | 1 | 03-02-2009 09:38 AM |
| Partial Fills | nfeldberg | Strategy Development | 2 | 08-26-2008 09:23 AM |
| Trade Fills | naifwonder | Strategy Development | 1 | 08-21-2008 12:14 PM |
| Partial Fills | SystemTrading | Miscellaneous Support | 1 | 08-20-2008 08:43 AM |
| Partial Fills | Harry | ATM Strategies (Discretionary Trading) | 5 | 02-26-2008 06:25 AM |