File Name: WD_MACD.efs
Description:
Weekly & Daily MACD by Vitali Apirine
Formula Parameters:
WD_MACD.efs
Fast Length: 12
Slow Length: 26
Multiplier: 5
Notes:
The related article is copyrighted material. If you are not a subscriber
of Stocks & Commodities, please visit www.traders.com.
Download File:
WD_MACD.efs
WD_MACD.efs
EFS Code:
Description:
Weekly & Daily MACD by Vitali Apirine
Formula Parameters:
WD_MACD.efs
Fast Length: 12
Slow Length: 26
Multiplier: 5
Notes:
The related article is copyrighted material. If you are not a subscriber
of Stocks & Commodities, please visit www.traders.com.
Download File:
WD_MACD.efs
WD_MACD.efs
EFS Code:
PHP Code:
/*********************************
Provided By:
eSignal (Copyright c eSignal), a division of Interactive Data
Corporation. 2016. All rights reserved. This sample eSignal
Formula Script (EFS) is for educational purposes only and may be
modified and saved under a new file name. eSignal is not responsible
for the functionality once modified. eSignal reserves the right
to modify and overwrite this EFS file with each new release.
Description:
Weekly & Daily MACD by Vitali Apirine
Version: 1.00 10/11/2017
Formula Parameters: Default:
Fast Length 12
Slow Length 26
Multiplier 5
Notes:
The related article is copyrighted material. If you are not a subscriber
of Stocks & Commodities, please visit www.traders.com.
**********************************/
var fpArray = new Array();
function preMain(){
setPriceStudy(false);
setCursorLabelName("WMACD", 0);
setCursorLabelName("W&D MACD", 1);
setDefaultBarFgColor(Color.RGB(255,106,0), 1);
var x = 0;
fpArray[x] = new FunctionParameter("fast", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(12);
setName("Fast Length");
}
fpArray[x] = new FunctionParameter("slow", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(26);
setName("Slow Length");
}
fpArray[x] = new FunctionParameter("mult", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(5);
setName("Multiplier");
}
}
var bInit = false;
var bVersion = null;
var xMACDD = null;
var xMACDW = null;
function main(fast, slow, mult){
if (bVersion == null) bVersion = verify();
if (bVersion == false) return;
if (getBarState() == BARSTATE_ALLBARS){
bInit = false;
}
if (!bInit){
xMACDD = macd(fast, slow, 1);
xMACDW = macd(fast * mult, slow * mult, 1);
addBand(0, PS_DASH, 1, Color.grey, 2);
bInit = true;
}
nMACDD = xMACDD.getValue(0);
nMACDW = xMACDW.getValue(0);
if (nMACDD != null && nMACDW != null){
return [nMACDW, (nMACDW + nMACDD)];
}
}
function verify(){
var b = false;
if (getBuildNumber() < 779){
drawTextAbsolute(5, 35, "This study requires version 10.6 or later.",
Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
null, 13, "error");
drawTextAbsolute(5, 20, "Click HERE to upgrade.@URL=http://www.esignal.com/download/default.asp",
Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
null, 13, "upgrade");
return b;
}
else
b = true;
return b;
}