NexusFi: Find Your Edge


Home Menu

 





Moving Average With Colors TOS Code


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one leaky01ch with 2 posts (1 thanks)
    2. looks_two txsroper with 2 posts (0 thanks)
    3. looks_3 Marty3 with 1 posts (14 thanks)
    4. looks_4 Drive with 1 posts (0 thanks)
    1. trending_up 21,337 views
    2. thumb_up 15 thanks given
    3. group 12 followers
    1. forum 10 posts
    2. attach_file 3 attachments




 
Search this Thread
  #1 (permalink)
 Marty3 
New York, New York
 
Experience: Beginner
Platform: ThinkorSwim
Trading: Stocks
Posts: 1 since Jun 2013
Thanks Given: 0
Thanks Received: 1

Here is the TOS code I wrote for a moving average that is green when up and red when down. You can select the following:
  • Color (up, down, flat)
  • Average type (simple, exponential, weighted, Wilders, or Hull)
  • Length
  • Line Type
  • Price (close, open, high, low, etc.)

Good trading!


Attached Files
Elite Membership required to download: MA_ColorSTUDY.ts
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
No book, only a stair: journaling fills where price move …
Cryptocurrency
EA
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
Datafeed for Atas
Platforms and Indicators
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
TopStep Trader disappointment
2 thanks
Johnnys Journal
2 thanks
  #2 (permalink)
leaky01ch
Angola+Indiana/USA
 
Posts: 2 since May 2015
Thanks Given: 0
Thanks Received: 1

I would like to use the TOS Code, but I can not open it. What do I need to use to do so?


Reply With Quote
Thanked by:
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098



leaky01ch View Post
I would like to use the TOS Code, but I can not open it. What do I need to use to do so?

I can read it with wordpad.


Reply With Quote
  #4 (permalink)
leaky01ch
Angola+Indiana/USA
 
Posts: 2 since May 2015
Thanks Given: 0
Thanks Received: 1

Thank You


Reply With Quote
  #5 (permalink)
Drive
Bakersfield
 
Posts: 7 since Feb 2019
Thanks Given: 0
Thanks Received: 0

Im looking for a Script that turns the price candles Green when the Slow Stochastic K period crossover the D period signifying a bullish condition, and Red candles when the K period crosses below the D period signifying a bearish condition.


Reply With Quote
  #6 (permalink)
clivecbw
BayanBary/Malaysia
 
Posts: 1 since Jun 2020
Thanks Given: 0
Thanks Received: 0

thank you very much. it work for me.


Reply With Quote
  #7 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40


Marty3 View Post
Here is the TOS code I wrote for a moving average that is green when up and red when down. You can select the following:
  • Color (up, down, flat)
  • Average type (simple, exponential, weighted, Wilders, or Hull)
  • Length
  • Line Type
  • Price (close, open, high, low, etc.)

Good trading!

Attachment 117647

awesome


Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
matthew2582
Kansas City, USA
 
Posts: 2 since Mar 2018
Thanks Given: 2
Thanks Received: 0


Marty3 View Post
Here is the TOS code I wrote for a moving average that is green when up and red when down. You can select the following:
  • Color (up, down, flat)
  • Average type (simple, exponential, weighted, Wilders, or Hull)
  • Length
  • Line Type
  • Price (close, open, high, low, etc.)

Good trading!

Attachment 117647

Hi - thank you very much for this - very helpful - is it possible to add an audio alert setting when the color changes?

Thank you once again

Matthew Therrien


Reply With Quote
  #9 (permalink)
xuluxa
Tucuman
 
Posts: 1 since Oct 2020
Thanks Given: 1
Thanks Received: 0

I would also like an alert.


Reply With Quote
  #10 (permalink)
NoBushwhack
San Jose, CA
 
Posts: 1 since Feb 2021
Thanks Given: 1
Thanks Received: 0


I haven't tested it but should work

#Alert
Alert(MA > MA[1] and MA[1] < MA[2], "Up", Alert.BAR, Sound.Bell);
Alert(MA < MA[1] and MA[1] > MA[2], "Down", Alert.BAR, Sound.Bell);


Reply With Quote




Last Updated on February 7, 2021


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts