For most this is ultra basic. I recently signed up with eSignal and an interval-independent SMA/EMA that would stay the same on monthly, weekly, daily, and intraday time periods was the first thing I looked for and didn't find it.
So if you've signed up and need this right away, here it is. I have 8 in the array, but it's easy to copy/paste to add more or take some out. Just edit the periods and colors and all to suite your style.
So if you've signed up and need this right away, here it is. I have 8 in the array, but it's easy to copy/paste to add more or take some out. Just edit the periods and colors and all to suite your style.
/************************************************** ***************
Provided By:
Interactive Data Corporation (Copyright © eSignal) 2010.
All rights reserved. This sample eSignal Formula Script (EFS)
is for educational purposes only. Interactive Data Corporation
reserves the right to modify and overwrite this EFS file with
each new release.
Description:
Daily SMA Set
Notes:
Alex Sonne
[email protected]
This is simply a single study that you can use to plot all of
your favorite SMA's at once. The SMA's are scale-independent,
meaning that whether you switch to weekly, daily, 30min, 1min
or tick, they are calculated from daily periods.
To name them, change the text between the quotes following
the setCursorLabelName function. The last SMA plots a dotted
line instead of solid—change this in setDefaultBarStyle for
any of the SMAs, 0-7 (or add more). Choose your own periods by
changing the number after sma( and the interval by changing the
character behind inv(. Daily(D), Weekly(W), and Monthly (M)
require quotes; minute periods such as 5, 15, 30 do not.
************************************************** ****************/
function preMain() {
setPriceStudy(true);
setStudyTitle("DailyMAs");
setCursorLabelName("10 Day",0);
setCursorLabelName("20 Day",1);
setCursorLabelName("50 Day",2);
setCursorLabelName("100 Day",3);
setCursorLabelName("126 Day",4);
setCursorLabelName("200 Day",5);
setCursorLabelName("375 Day",6);
setCursorLabelName("500 Day",7);
setDefaultBarFgColor(Color.white, 0);
setDefaultBarFgColor(Color.red, 1);
setDefaultBarFgColor(Color.lime, 2);
setDefaultBarFgColor(Color.aqua, 3);
setDefaultBarFgColor(Color.yellow, 4);
setDefaultBarFgColor(Color.magenta, 5);
setDefaultBarFgColor(Color.lightgrey, 6);
setDefaultBarFgColor(Color.white, 7);
setDefaultBarStyle(PS_DOT, 7);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
}
function main() {
return new Array (sma(10, inv("D")), sma(20, inv("D")), sma(50, inv("D")), sma(100, inv("D")), sma(126, inv("D")), sma(200, inv("D")), sma(375, inv("D")), sma(500, inv("D")));
}
Provided By:
Interactive Data Corporation (Copyright © eSignal) 2010.
All rights reserved. This sample eSignal Formula Script (EFS)
is for educational purposes only. Interactive Data Corporation
reserves the right to modify and overwrite this EFS file with
each new release.
Description:
Daily SMA Set
Notes:
Alex Sonne
[email protected]
This is simply a single study that you can use to plot all of
your favorite SMA's at once. The SMA's are scale-independent,
meaning that whether you switch to weekly, daily, 30min, 1min
or tick, they are calculated from daily periods.
To name them, change the text between the quotes following
the setCursorLabelName function. The last SMA plots a dotted
line instead of solid—change this in setDefaultBarStyle for
any of the SMAs, 0-7 (or add more). Choose your own periods by
changing the number after sma( and the interval by changing the
character behind inv(. Daily(D), Weekly(W), and Monthly (M)
require quotes; minute periods such as 5, 15, 30 do not.
************************************************** ****************/
function preMain() {
setPriceStudy(true);
setStudyTitle("DailyMAs");
setCursorLabelName("10 Day",0);
setCursorLabelName("20 Day",1);
setCursorLabelName("50 Day",2);
setCursorLabelName("100 Day",3);
setCursorLabelName("126 Day",4);
setCursorLabelName("200 Day",5);
setCursorLabelName("375 Day",6);
setCursorLabelName("500 Day",7);
setDefaultBarFgColor(Color.white, 0);
setDefaultBarFgColor(Color.red, 1);
setDefaultBarFgColor(Color.lime, 2);
setDefaultBarFgColor(Color.aqua, 3);
setDefaultBarFgColor(Color.yellow, 4);
setDefaultBarFgColor(Color.magenta, 5);
setDefaultBarFgColor(Color.lightgrey, 6);
setDefaultBarFgColor(Color.white, 7);
setDefaultBarStyle(PS_DOT, 7);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
}
function main() {
return new Array (sma(10, inv("D")), sma(20, inv("D")), sma(50, inv("D")), sma(100, inv("D")), sma(126, inv("D")), sma(200, inv("D")), sma(375, inv("D")), sma(500, inv("D")));
}
Comment