Need little help with direct DoubleMA - NinjaTrader Programming | futures io social day trading
futures io futures trading

Need little help with direct DoubleMA
Updated: Views / Replies:1,338 / 3
Created: by Peter Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

Need little help with direct DoubleMA

  #1 (permalink)
Elite Member
Brisbane; Australia
Futures Experience: Intermediate
Platform: NT
Broker/Data: IB/TDA needing new broker
Favorite Futures: Futures, Forex, Stocks
Peter's Avatar
Posts: 97 since Jun 2009
Thanks: 91 given, 101 received

Need little help with direct DoubleMA

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
#region Variables:
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.

Thanks Peter

Attached Files
Register to download File Type: cs test1.cs (4.3 KB, 10 views)
Reply With Quote
  #2 (permalink)
Elite Member
Neubrandenburg, Germany
Futures Experience: Advanced
Platform: R
Favorite Futures: Stocks
wh's Avatar
Posts: 538 since Jun 2009
Thanks: 297 given, 482 received

i do not know, but the problem is the method CrossBelow(),CrossAbove()

bool IndicatorBase.CrossBelow(IDataSeries series 1,
IDataSeries series 2,
int lookBackPeriod)

IDataSeries is a Interface how describe the input (EMA type and Period)

the normal dataseries hold only the value of EMA type and Period. I think that is your problem.

What will you do??

Last edited by wh; June 30th, 2009 at 07:47 AM.
Reply With Quote
  #3 (permalink)
Elite Member
Brisbane; Australia
Futures Experience: Intermediate
Platform: NT
Broker/Data: IB/TDA needing new broker
Favorite Futures: Futures, Forex, Stocks
Peter's Avatar
Posts: 97 since Jun 2009
Thanks: 91 given, 101 received

7:54am wh: string ma = "EMA"; string period = "(19)"; string togehter = ma+period; so you can use enmus, cast and so on , but i do not know if it works but i think

WH thanks for the chat input will look at your String/MA suggestion tomorrow.

Reply With Quote
  #4 (permalink)
Site Administrator
Manta, Ecuador
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 46,336 since Jun 2009
Thanks: 29,452 given, 83,954 received


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.
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.

Reply With Quote


futures io > > > > > Need little help with direct DoubleMA

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help visualizing a measure of volatility on a time series? Direct Statistics. forrestang Matlab, R project and Python 9 April 1st, 2011 05:04 PM
CME direct connections & clearing Scalpguy The Elite Circle 2 January 21st, 2011 01:59 AM
Week Ahead: Jobs to Direct Markets—and Maybe the Fed Quick Summary News and Current Events 0 October 1st, 2010 08:30 PM
ING Direct Black Friday, get $121 free Big Mike Off-Topic 0 November 27th, 2009 03:13 PM
DoubleMA Maletor NinjaTrader Programming 2 June 12th, 2009 06:58 PM

All times are GMT -4. The time now is 06:05 AM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2018-05-28 in 0.08 seconds with 20 queries on phoenix via your IP