I am needing some help with getting an order to enter once a doublema changes from falling to rising.
I have tried several things, but can't get it to work at the correct spots.
I just need help with the entry trigger. When DoubleMA changes from falling to rising (it changes colour anyway) I would like to enter a long.
I would like to only take one trade per change from falling to rising as well.
As it is not crossing over anything, I am confused.
Thanks in advance
Regards
first of all - i dont like these big indicator-codes like the DMA-stuff in strategys - thats why the first step would be to create a new small indicator or reducing it to an easy formular (without all color+parameter-things) wich hits what i needs -- example :
ZeroLagEMA(ZeroLagEMA(period), period)
than as condition a would try this :
if
ZeroLagEMA(ZeroLagEMA(period), period) [0] > ZeroLagEMA(ZeroLagEMA(period), period) [1]
... do something
if
ZeroLagEMA(ZeroLagEMA(16), 16) [0] > ZeroLagEMA(ZeroLagEMA(16), 16) [1]
... ENTER long ...
If this easy thing does what you want, you can go on + add more conditions
thats my why of building up + testing conditions.
Mike,
I am wondering how I can use this information in a strategy please.
I am a real novice when it comes to C#.
"I released a newer version of DoubleMA with more moving averages and a Signal dataseries (0 neutral, -1 short, 1 long).
Could you please provide an example?
ie: if
(DoubleMA(45,NinjaTrader.Indicator.DoubleMA_internal.DMAType.EMA,45,NinjaTrader.Indicator.DoubleMA_internal.DMAType.EMA).signal[1]
Keep in mind if you use the wizard it places + sign instead of . in a couple of places, you need to manually change it, but your string above seems fine.
Thanks Mike.
I tried it and it ame me an error of:Cannot implicitly convert type 'double' to 'bool'
So I tried this:
if (DoubleMA(30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA,30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA).Signal[1] > DoubleMA(30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA,30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA).Signal[-1])
{
EnterLongLimit(DefaultQuantity, GetCurrentAsk(), "Long");
}
It compiled but doesn't work.
All I am trying to do it enter a long after the DMA goes from falling to rising. I must be dumb.
Sorry
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
Posts: 49,742 since Jun 2009
Thanks: 32,288 given,
97,473
received
There is a whole thread about DMA and signal issues. (I think this is it, not sure). I personally don't use it so can't comment. You might try using the DMV dataseries and see if it works any better for you. DMV returns the value not a signal, so you need to use Rising or Falling:
Also as mentioned earlier by max-td here you might eliminate DoubleMA and do it his way. Although honestly, I've not tested this and am not sure if it produces the same results as DoubleMA.
Thanks Sam.
I guess I was hoping that I could build a strategy on the DMA and other indicators. I had hoped to use the change of colour as a reference point. ie. When the DMA turns from falling to rising is changes colour.
Anyway, it seems to be not possible. The entries are too slow.
Regards
Thanks BigMike
after 2 weeks HERE is the answer .... "Keep in mind if you use the wizard it places + sign instead of . in a couple of places, you need to manually change it, but your string above seems fine.
Mike "
i replaced the'+' with a '.' and now it will compile!!
Vic10
The following user says Thank You to Victor 10 for this post: