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'm writing to ask if someone would be willing to help me finish the coding for the following GMMA Oscillator. I've found the GMMA system, combined with FIBS and the 100 WMA to be a very consistent trading method.
I've (re)coded the following GMMA Oscillator to reflect the price crossing the 100 WMA. When the color changes from RED to BLUE (and vice versa) at the 0 line, it means the price has crossed the 100 WMA - which is a signal to enter a trade. The 100 WMA frequently corresponds to the 50% FIB line when the price crosses it.
My issue is that I only get ONE multi-colored line, which doesn't reflect a cross of the Short Term MA (over or under) the Long Term MA. (See Attachment "TOS GMMA Osc").
The indicator SHOULD look like the one for Ninjatrader ... (See Attachment "NT GMMA Osc").
The following is the CODE I'm currently using in TOS. If you can help me code this properly - so it looks and operates like the one for Ninjatrader, I would be VERY GRATEFUL. I know it's something simple, but I'm missing it somehow ....
change this to:
input averageType = {Simple, default Exponential, Weighted, Wilders, Hull};
input length = 13;
def GMMA = ((Short1 - Long2) / Long2) * 100;
def GMMAAvg;
switch (averagetype) {
case simple:
GMMAAvg = Average(GMMA, length);
case Exponential:
GMMAAvg = ExpAverage(GMMA, length);
case Weighted:
GMMAAvg =wma(GMMA, length);
case Wilders:
GMMAAvg = WildersAverage(GMMA, length);
case Hull:
GMMAAvg =hullMovingAvg(GMMA, length);
}
plot GMMAOsc = GMMA;
plot GMMAX = GMMAAvg;
To change the colors like you have above, add the same syntax to the second line of my plot. Perhaps you might consider coloring by whether or not the oscillator is above below it's average...just an idea. If you need help with the syntax, LMK.
Can someone help me with this. I can't seem to get this right. I'm trying to piece together the code for ToS previously shown but it's not working out.