Академический Документы
Профессиональный Документы
Культура Документы
Instructions:
1) These are not importable studies.
2) In a TOS chart, select "Edit Studies and Strategies"
3) Click the "New..." button in the lower left on the panel
4) Give the study a new name - no spaces. OK, flatter me by using my study name.
Make sure you have the thinkscript Editor selected.
5) Select the text in this document between the
"//////////COPY BELOW THIS LINE//////////"
and
"//////////COPY ABOVE THIS LINE//////////"
6) Paste it into your new study
7) The editor will validate your code. If there are no errors, click OK.
8) Tweak the study as you wish under "Properties"
9) Happy Trading
--------------------------------------------------------------------------Timeframe: 1 to 5 Studies (used for 1:5 timeframe fractals)
OG_MACD_1to5
For manual setup:
Short ema=3
Long ema=10
ema of MACD=15
Turn histogram off
---------------------------------------------------------------------//////////COPY BELOW THIS LINE//////////
# OG_MACD_1to5_v2
# jeff@theoptionguru.com
# Last Update 12/9/2013
declare lower;
input
input
input
input
fastLength = 3;
slowLength = 10;
MACDLength = 15;
AverageType = {SMA, default EMA};
plot Value;
plot Avg;
switch (AverageType) {
case SMA:
Value = Average(close, fastLength) - Average(close, slowLength);
Avg = Average(Value, MACDLength);
case EMA:
Value = ExpAverage(close, fastLength) - ExpAverage(close, slowLength);
Avg = ExpAverage(Value, MACDLength);
}
Avg.AssignValueColor(if Avg > Avg[1] then color.white else (if Avg == Avg[1] the
n color.white else color.magenta));
Avg.SetLineWeight(2);
plot Diff = Value - Avg;
plot ZeroLine = 0;
Value.SetDefaultColor(GetColor(1));
Avg.SetDefaultColor(GetColor(8));
Diff.AssignValueColor(if DIFF > DIFF[1] then color.green else (if DIFF == DIFF[1
] then color.green else color.red));
ZeroLine.SetDefaultColor(GetColor(0));
//////////COPY ABOVE THIS LINE//////////
------------------------------------------------------------------------------OG_Stochastic_1to5
For manual setup:
%K:3
%K smoothing:1
%D:3