I am trying to create a strategy with a cross-over based on a doubleMA without the DMA indicator
if (CrossBelow(EMA(HMA(11),12),SMA(WMA(13),14),1) ) works
As I want to make the MAtype available in the strategy I wanted to use something like
if (CrossBelow(mA1Type(HMA(11),12),SMA(WMA(13),14),1) ) but that gives the following error
'NinjaTrader.Strategy.test2.mA1Type' is a 'field' but used like a 'method'
I did declare under
private int mA1Period = 12;
private NinjaTrader.Indicator.DoubleMA_internal.DMAType mA1Type = NinjaTrader.Indicator.DoubleMA_internal.DMAType.EMA;
I then thought of making a new DataSeries line1 and a DataSeries line2 and use these in a crossover statement, but after trying different things got stuck again.
Would appreciate if one of you have a look at the test1.cs and get me going again.
If you want to take a look at complete functioning code other than the convoluted DoubleMA, check out Roonius' SuperTrend v2.1, it is a self-contained method of enumerating the MA's.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.