efs seems to work on historical price.. but in real tie it puts a circle on every new bar formed.
Any suggestions?
Thank you
Provided By : eSignal (c) Copyright 2007
****************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("Insidebar");
setShowCursorLabel(false);
setShowTitleParameters(false);
setPlotType(PLOTTYPE_CIRCLE, 0);
setDefaultBarThickness(5, 0);
var fp1 = new FunctionParameter("cColor", FunctionParameter.COLOR);
fp1.setName("Color");
fp1.setDefault(Color.blue);
var fp2 = new FunctionParameter("nSize", FunctionParameter.NUMBER);
fp2.setName("Size");
fp2.setDefault(4);
var fp3 = new FunctionParameter("bEnable", FunctionParameter.BOOLEAN);
fp3.setName("Enable Alerts");
fp3.setDefault(true);
}
var bInit = false;
var bAlert = false;
function main(cColor, nSize, bEnable) {
if (bInit == false) {
setDefaultBarThickness(nSize, 0);
setDefaultBarFgColor(cColor, 0);
}
if (getBarState() == BARSTATE_NEWBAR) {
if (bAlert == true && bEnable == true) {
Alert.playSound("pop.wav");
Alert.addToList(getSymbol(), "Insidebar", cColor, Color.white);
}
bAlert = false;
}
if (high(0) < high(-1) && low(0) > low(-1) ) {
{
bAlert = true;
}
}
if (bAlert == true) {
return close(0);
} else {
return;
}
}
Any suggestions?
Thank you
Provided By : eSignal (c) Copyright 2007
****************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("Insidebar");
setShowCursorLabel(false);
setShowTitleParameters(false);
setPlotType(PLOTTYPE_CIRCLE, 0);
setDefaultBarThickness(5, 0);
var fp1 = new FunctionParameter("cColor", FunctionParameter.COLOR);
fp1.setName("Color");
fp1.setDefault(Color.blue);
var fp2 = new FunctionParameter("nSize", FunctionParameter.NUMBER);
fp2.setName("Size");
fp2.setDefault(4);
var fp3 = new FunctionParameter("bEnable", FunctionParameter.BOOLEAN);
fp3.setName("Enable Alerts");
fp3.setDefault(true);
}
var bInit = false;
var bAlert = false;
function main(cColor, nSize, bEnable) {
if (bInit == false) {
setDefaultBarThickness(nSize, 0);
setDefaultBarFgColor(cColor, 0);
}
if (getBarState() == BARSTATE_NEWBAR) {
if (bAlert == true && bEnable == true) {
Alert.playSound("pop.wav");
Alert.addToList(getSymbol(), "Insidebar", cColor, Color.white);
}
bAlert = false;
}
if (high(0) < high(-1) && low(0) > low(-1) ) {
{
bAlert = true;
}
}
if (bAlert == true) {
return close(0);
} else {
return;
}
}
Comment