Hi
Need some help with Insert Study/Formula/Pattern/RT_OutsideBarAlert
I'd like 2 little changes in this script.
1. I would only prefer to see the arrow on top of outside bar rather than colour change of whole bar.
2. Current script changes the thin wick of all candles to thick and I prefer to see the candles with thin wicks.
Either of these 2 changes will make me very happy.
Regards
/*********************************
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:
Real Time Outside Bar
Version: 1.0 06/16/2009
Formula Parameters: Default:
Enable Alerts True
Outside Bar Color Blue
Up Bar Color Green
Down Bar Color Red
Notes:
**********************************/
var bNewBar = false;
var bAlert = false;
function preMain() {
setPriceStudy(true);
setStudyTitle("Real Time Outside Bar");
setShowCursorLabel(false);
setShowTitleParameters(false);
setColorPriceBars(true);
setDefaultPriceBarColor(Color.black);
var fp1 = new FunctionParameter("cColor", FunctionParameter.COLOR);
fp1.setName("Outside Bar Color");
fp1.setDefault(Color.RGB(0x00,0x94,0xFF));
var fp2 = new FunctionParameter("bEnable", FunctionParameter.BOOLEAN);
fp2.setName("Enable Alerts");
fp2.setDefault(true);
var fp3 = new FunctionParameter("cUpColor", FunctionParameter.COLOR);
fp3.setName("Up Bar Color");
fp3.setDefault(Color.green);
var fp4 = new FunctionParameter("cDownColor", FunctionParameter.COLOR);
fp4.setName("Down Bar Color");
fp4.setDefault(Color.RGB(0xFE,0x00,0x6D));
}
var xOpen = null;
var xHigh = null;
var xLow = null;
var xClose = null;
var bInit = false;
function main(bEnable, cColor, cUpColor, cDownColor) {
if (getBarState() == BARSTATE_NEWBAR) bNewBar = true;
if(!bInit){
xOpen = open();
xHigh = high();
xLow = low();
xClose = close();
bInit = true;
}
var nOpen = xOpen.getValue(0);
var nHigh = xHigh.getValue(0);
var nHigh_1 = xHigh.getValue(-1);
var nLow = xLow.getValue(0);
var nLow_1 = xLow.getValue(-1);
var nClose = xClose.getValue(0);
if(nHigh_1 == null || nLow_1 == null) return;
if (nHigh > nHigh_1 && nLow < nLow_1 ) bAlert = true;
if (bAlert == true) {
setPriceBarColor(cColor);
if (bEnable == true && bNewBar == true) {
Alert.playSound("pop.wav");
Alert.addToList(getSymbol(), "Outside Bar", cColor, Color.white);
bNewBar = false;
}
bAlert = false;
} else {
if (nClose >= nOpen)
setPriceBarColor(cUpColor)
else
setPriceBarColor(cDownColor)
}
return;
}
Need some help with Insert Study/Formula/Pattern/RT_OutsideBarAlert
I'd like 2 little changes in this script.
1. I would only prefer to see the arrow on top of outside bar rather than colour change of whole bar.
2. Current script changes the thin wick of all candles to thick and I prefer to see the candles with thin wicks.
Either of these 2 changes will make me very happy.
Regards
/*********************************
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:
Real Time Outside Bar
Version: 1.0 06/16/2009
Formula Parameters: Default:
Enable Alerts True
Outside Bar Color Blue
Up Bar Color Green
Down Bar Color Red
Notes:
**********************************/
var bNewBar = false;
var bAlert = false;
function preMain() {
setPriceStudy(true);
setStudyTitle("Real Time Outside Bar");
setShowCursorLabel(false);
setShowTitleParameters(false);
setColorPriceBars(true);
setDefaultPriceBarColor(Color.black);
var fp1 = new FunctionParameter("cColor", FunctionParameter.COLOR);
fp1.setName("Outside Bar Color");
fp1.setDefault(Color.RGB(0x00,0x94,0xFF));
var fp2 = new FunctionParameter("bEnable", FunctionParameter.BOOLEAN);
fp2.setName("Enable Alerts");
fp2.setDefault(true);
var fp3 = new FunctionParameter("cUpColor", FunctionParameter.COLOR);
fp3.setName("Up Bar Color");
fp3.setDefault(Color.green);
var fp4 = new FunctionParameter("cDownColor", FunctionParameter.COLOR);
fp4.setName("Down Bar Color");
fp4.setDefault(Color.RGB(0xFE,0x00,0x6D));
}
var xOpen = null;
var xHigh = null;
var xLow = null;
var xClose = null;
var bInit = false;
function main(bEnable, cColor, cUpColor, cDownColor) {
if (getBarState() == BARSTATE_NEWBAR) bNewBar = true;
if(!bInit){
xOpen = open();
xHigh = high();
xLow = low();
xClose = close();
bInit = true;
}
var nOpen = xOpen.getValue(0);
var nHigh = xHigh.getValue(0);
var nHigh_1 = xHigh.getValue(-1);
var nLow = xLow.getValue(0);
var nLow_1 = xLow.getValue(-1);
var nClose = xClose.getValue(0);
if(nHigh_1 == null || nLow_1 == null) return;
if (nHigh > nHigh_1 && nLow < nLow_1 ) bAlert = true;
if (bAlert == true) {
setPriceBarColor(cColor);
if (bEnable == true && bNewBar == true) {
Alert.playSound("pop.wav");
Alert.addToList(getSymbol(), "Outside Bar", cColor, Color.white);
bNewBar = false;
}
bAlert = false;
} else {
if (nClose >= nOpen)
setPriceBarColor(cUpColor)
else
setPriceBarColor(cDownColor)
}
return;
}
Comment