Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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
Can you help answer these questions from other members on NexusFi?
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.
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.