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)
Hello! i have a strategy that use the dmi indicator and the ema of the price over the dmi and i use the crosses(look the image for any question or ask). if i write a code to do it, the algo not work's because it isn't a real crosses( help me with this strategy - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum ). Anyone have some idea?
tHANK'S!
Can you help answer these questions from other members on NexusFi?
You cannot compare the value of an EMA to the value of the DMI, and in particular you cannot establish any crosses. The crosses that you have visualized on your chart depend on the horizontal chart compression. Change that compression and the crosses will move to another point.
This is like comparing apples to tomatoes. The DMI is a normalized oscillator which plots on a scale between + 1 and -1. Best you compare it to another normalized oscillator which uses exactly the same scale. Candidates would be modified versions of the Stochastics and the RSI.
I try to create this indicator. But if i would like to write a code in a strategy, such as: if(DMI[0]>EMA[0] && DMI[1]<EMA[1]) how can i write this? thank's!
Sorry, but what you are trying is simply mathematically impossible. This is what people are trying to tell you.
If you look at the chart you posted, yes, the lines do cross. But if you look at the actual values of the two indicators, looking at their actual scales, they never cross. There is never a time when the DMI, which on the chart varies from about -1 to a little above +0,5 will ever be above the EMA of FDAX, which on the chart goes from about 9860 to about 9910.
The condition DMI[0]>EMA [0] will never be true, because DMI will never get up into the area above 9860.
It looks like they cross, because on the chart the scale of the EMA is printed on the left and the scale of DMI is on the right, so they look like they have a similar range, but the "cross" is an illusion. It just has to do with how the picture is drawn, nothing to do with the two indicators at all, which never cross.
If you just go into the indicator properties, and have them both print on the same side of the chart, so they have the same scale, you will see that the DMI is far down at the bottom of the chart and the EMA is far, far above it. (Change "Scale Justification" under "Visual" so they are both Right, or both Left.)
You will just never have a situation when 0,5 > 9860.... You can just give this idea up, I'm afraid.
Thank's for the replay Bob!
i understand this concept, in fact the indicator that i try to dom, use the equal scale.
At least, my intention is to create an indicator that works in that way, then an average value of dmi.