log in     sign up for free
 
The trading rules I live by are: 1. Cut losses. 2. Ride winners. 3. Keep bets small. 4. Follow the rules without question. 5. Know when to break the rules.
Ed Seykota
 
 
Home
systems (285)
 
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Color on MACD Histogram

Formula for: TradeStation

indicator

 

 

Views:  1807

Added: November 26, 2006
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: TradeStation, indicator
 


To: omega-list@xxxxxxxxxx
Subject: Color on Histogram
From: ribau@xxxxxxxxxxxxx
Date: Wed, 04 Nov 1998 00:20:51 GMT
Resent-Date: Tue, 3 Nov 1998 16:22:09 -0800
Resent-From: omega-list@xxxxxxxxxx
Resent-Message-ID: <"6juXh2.0.ye4.nuvFs"@mx1>
Resent-Sender: omega-list-request@xxxxxxxxxx
Someone posted code to change the colors on a histogram to one color when the bars are rising and another color when the bars are falling, but I failed to keep the post and can't find it in the Omega List archives. I'm re-writing the MACD indicator included in TS to show "green" when MADiff is rising and red when falling. What I've done so far works most of the time except when the bar starts up and then turns down on the same bar, or vice versa, then I get both colors on the intraday bar:

 

 



Code:

Input: FastMA(12),SlowMA(26),MacdMA(9); Vars:
BullKeyReversal(FALSE),
BearKeyReversal(FALSE),
LTHighestUnder(FALSE),
LTLowestUnder(FALSE),
LongTermTrendUnder(0),
ShortTermTrendUnder(0),
LongTermTrendIndic(0),
ShortTermTrendIndic(0),
nocommentary(FALSE),
ShortTermDays(0),
LongTermDays(0),
LTAvgUnd(0),
STAvgUnd(0),
LTAvgInd(0),
STAvgInd(0),
String1("");

Plot1(MACD(Close,FastMA,SlowMA),"MACD");
Plot2(XAverage(MACD(Close,FastMA,SlowMA),MacdMA),"MACDAvg");

Value1 = (Plot1-Plot2);
If Value1 > Value1[1] then Plot3(Value1,"MAup")
Else Plot4(Value1,"MAdn");


 





Code to difficult? Find somebody to help you with coding here.

 


Source: http://www.purebytes.com

 

View similar (indicator for TradeStation):

VIDYA
Dunn's Channelanalyzer
OBVDI w/ Avg
Kaufman Smoothing Constant Part of the Graile
Regularization
CCI - Stochastic (CCI-STO)
## Retr Indicator
MFI Convergence Divergence
MATCH
LMS Predictor
...
 
 
all formulas for TradeStation
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
PayPalSecure payments by PayPal S4T™ is a part of TAURO EDUCATION NETWORK
 
Privacy note | (c) copyrights systems4trading.com 2006-2009