GMMA Oscillator Coding for TOS - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Notices

GMMA Oscillator Coding for TOS
Updated: Views / Replies:5,226 / 3
Created: by Zephyr Attachments:3

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 100,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
 

GMMA Oscillator Coding for TOS

 
Elite Member
Nashville, TN
 
Futures Experience: Intermediate
Platform: TOS + NT
Broker/Data: TBD
Favorite Futures: NQ, CL, eminiRussell +
 
Posts: 41 since Aug 2009
Thanks: 23 given, 23 received

GMMA Oscillator Coding for TOS

Friends ....

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

Thank you for any help you can provide!

Zephyr
----------------------------

def Short1 = (ExpAverage(Close, 3) + ExpAverage(Close, 5) +
ExpAverage(Close, 8) + ExpAverage(Close, 10) +
ExpAverage(Close, 12) + ExpAverage(Close, 15));

def Long2 = (ExpAverage(Close, 30) + ExpAverage(Close, 35) +
ExpAverage(Close, 40) + ExpAverage(Close, 45) +
ExpAverage(Close, 50) + ExpAverage(Close, 60));

plot GuppyMMAOscillator = ((Short1 - Long2) / Long2) * 100;

GuppyMMAOscillator.AssignValueColor(if Short1 < Long2 then color.red else if Short1 > Long2 then color.BLUE else color.YELLOW);

plot ZeroLine = 0;
ZeroLine.SetDefaultColor(GetColor(7));

Attached Thumbnails
GMMA Oscillator Coding for TOS-tos-gmma-osc.png   GMMA Oscillator Coding for TOS-nt-gmma-osc.png  
Attached Files
Register to download File Type: txt NT GMMA Osc Code.txt (8.0 KB, 92 views)
The following 2 users say Thank You to Zephyr for this post:
 
 
Elite Member
Glyndon, Maryland, USA
 
Futures Experience: Advanced
Platform: TOS
Favorite Futures: options
 
Posts: 24 since Sep 2010
Thanks: 6 given, 47 received

From what I just read, you need an additional moving average added to the plot of the oscillator itself. You can easily do this via:


plot GuppyMMAOscillator = ((Short1 - Long2) / Long2) * 100;

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.

The following 2 users say Thank You to optntdr13 for this post:
 
 
Elite Member
Nashville, TN
 
Futures Experience: Intermediate
Platform: TOS + NT
Broker/Data: TBD
Favorite Futures: NQ, CL, eminiRussell +
 
Posts: 41 since Aug 2009
Thanks: 23 given, 23 received


Thank you VERY MUCH, optntdr13!


It's very good of you to help with this code. I'll make the changes you've suggested.



Be well ... and thank you again ....

 
 
Trading Apprentice
Indianapolis
 
Futures Experience: None
Platform: TD
Favorite Futures: None
 
Posts: 1 since Nov 2018
Thanks: 0 given, 0 received

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.


 



futures io > > > > > GMMA Oscillator Coding for TOS
Thread Tools



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

Fundraiser: Feeding Families in Need (ends Dec 17)

December
 

Battlestations! Show us your trading desks w/GFF Brokers ($750 in Prizes)

January
 

An Afternoon With Morad Askar (aka FuturesTrader71)

Elite only
 

Traders Tax Advice w/Ryan Curran CPA

Elite only
 

Black Swan Events w/Adam Grimes

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help using Awesome Oscillator as a filter protrader007 NinjaTrader Programming 19 August 30th, 2016 05:11 PM
code for NT7 volume oscillator euroventure NinjaTrader 2 December 22nd, 2010 12:42 PM
d9 Particle Oscillator Big Mike Platforms, Tools and Indicators 0 September 1st, 2010 04:35 AM
TWIGGS Oscillator for MT4... Chiantishire MetaQuotes MetaTrader MQL Programming 1 April 1st, 2010 05:26 AM
Oscillator 0 - 100 zeller4 NinjaTrader Programming 4 September 14th, 2009 09:27 AM


Tags
average, code, fibonacci, gmma, hull, indicator, indicators, long term, moving average, ninjatrader, oscillator, short term, signal, think or swim, thinkorswim, thinkscript, tos, trading, trading method

All times are GMT -4. The time now is 12:53 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business, info@futures.io
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-12-15 in 0.08 seconds with 14 queries on phoenix