Alex-
I've been using your AM Triangular MA.
Is there a way to have a sound alert and pop-up when price bar touches/crosses this ma?
Thanks for your help.
dido
var fpArray = new Array();
function preMain() {
setPriceStudy(true);
setStudyTitle("Triangular MA");
setCursorLabelName("TMA",0);
setDefaultBarFgColor(Color.blue,0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
askForInput();
var x=0;
fpArray[x] = new FunctionParameter("Length", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(10);
}
fpArray[x] = new FunctionParameter("Source", FunctionParameter.STRING);
with(fpArray[x++]){
addOption("open");
addOption("high");
addOption("low");
addOption("close");
addOption("hl2");
addOption("hlc3");
addOption("ohlc4");
setDefault("close");
}
fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.STRING);
with(fpArray[x++]){
setDefault();
}
fpArray[x] = new FunctionParameter("Interval", FunctionParameter.STRING);
with(fpArray[x++]){
setDefault();
}
fpArray[x] = new FunctionParameter("Offset", FunctionParameter.NUMBER);
with(fpArray[x++]){
setDefault(0);
}
fpArray[x] = new FunctionParameter("Params", FunctionParameter.BOOLEAN);
with(fpArray[x++]){
setName("Show Parameters");
setDefault(false);
}
}
var amLib = addLibrary("amStudies.efsLib");
var bInit = false;
var xTMA = null;
function main(Length,Source,Symbol,Interval,Offset,Params) {
if(bInit == false){
with( amLib ) {
if(Symbol == null) Symbol = getSymbol();
if(Interval == null) Interval = getInterval();
var vSymbol = Symbol+","+Interval;
xTMA = offsetSeries(amTMA(Length,eval(Source)(sym(vSymbol ))),Offset);
setShowTitleParameters(eval(Params));
bInit = true;
}
}
return getSeries(xTMA);
I've been using your AM Triangular MA.
Is there a way to have a sound alert and pop-up when price bar touches/crosses this ma?
Thanks for your help.
dido
var fpArray = new Array();
function preMain() {
setPriceStudy(true);
setStudyTitle("Triangular MA");
setCursorLabelName("TMA",0);
setDefaultBarFgColor(Color.blue,0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
askForInput();
var x=0;
fpArray[x] = new FunctionParameter("Length", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(10);
}
fpArray[x] = new FunctionParameter("Source", FunctionParameter.STRING);
with(fpArray[x++]){
addOption("open");
addOption("high");
addOption("low");
addOption("close");
addOption("hl2");
addOption("hlc3");
addOption("ohlc4");
setDefault("close");
}
fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.STRING);
with(fpArray[x++]){
setDefault();
}
fpArray[x] = new FunctionParameter("Interval", FunctionParameter.STRING);
with(fpArray[x++]){
setDefault();
}
fpArray[x] = new FunctionParameter("Offset", FunctionParameter.NUMBER);
with(fpArray[x++]){
setDefault(0);
}
fpArray[x] = new FunctionParameter("Params", FunctionParameter.BOOLEAN);
with(fpArray[x++]){
setName("Show Parameters");
setDefault(false);
}
}
var amLib = addLibrary("amStudies.efsLib");
var bInit = false;
var xTMA = null;
function main(Length,Source,Symbol,Interval,Offset,Params) {
if(bInit == false){
with( amLib ) {
if(Symbol == null) Symbol = getSymbol();
if(Interval == null) Interval = getInterval();
var vSymbol = Symbol+","+Interval;
xTMA = offsetSeries(amTMA(Length,eval(Source)(sym(vSymbol ))),Offset);
setShowTitleParameters(eval(Params));
bInit = true;
}
}
return getSeries(xTMA);
Comment