File Name: Dunnigan_Bars.efs
Description:
This displays "Dunnigan Bars," which is defined as:
Higher High and High Low = Green Color
Lower High and Lower Low = Red Color
Inside Bar = Grey Color
Outside Bar = Yellow Color
Colors are adjustable through the Edit Studies menu.
Formula Parameters:
HHHLColor - Sets color for Higher High and High Low Bars
LHLLColor - Sets color for Lower High and Lower Low Bars
InsideColor - Sets color for Inside Bars
OutsideColor - Sets color for Outside Bars
Download File:
Dunnigan_Bars.efs
EFS Code:
Description:
This displays "Dunnigan Bars," which is defined as:
Higher High and High Low = Green Color
Lower High and Lower Low = Red Color
Inside Bar = Grey Color
Outside Bar = Yellow Color
Colors are adjustable through the Edit Studies menu.
Formula Parameters:
HHHLColor - Sets color for Higher High and High Low Bars
LHLLColor - Sets color for Lower High and Lower Low Bars
InsideColor - Sets color for Inside Bars
OutsideColor - Sets color for Outside Bars
Download File:
Dunnigan_Bars.efs
EFS Code:
PHP Code:
/*****************************
Copyright © eSignal, 2003
Title: Dunnigan Bars
Version: 1.0
==========================
Fix History:
==========================
Project Description:
This displays "Dunnigan Bars," which is defined as:
Higher High and High Low = Green Color
Lower High and Lower Low = Red Color
Inside Bar = Grey Color
Outside Bar = Yellow Color
Colors are adjustable through the Edit Studies menu.
*****************************/
function preMain() {
setStudyTitle("Dunnigan Bars");
setShowCursorLabel(false);
setColorPriceBars(true);
setPriceStudy(true);
var fp6 = new FunctionParameter("HHHLColor", FunctionParameter.COLOR);
fp6.setName("Higher High & Higher Low Color");
fp6.setDefault(Color.green); //Edit this value to set a new default
var fp7 = new FunctionParameter("LHLLColor", FunctionParameter.COLOR);
fp7.setName("Lower High & Lower Low Color");
fp7.setDefault(Color.red); //Edit this value to set a new default
var fp8 = new FunctionParameter("InsideColor", FunctionParameter.COLOR);
fp8.setName("Inside Bars Color");
fp8.setDefault(Color.grey); //Edit this value to set a new default
var fp9 = new FunctionParameter("OutsideColor", FunctionParameter.COLOR);
fp9.setName("Outside Bars Color");
fp9.setDefault(Color.yellow); //Edit this value to set a new default
}
function main(HHHLColor, LHLLColor, InsideColor, OutsideColor) {
var vHigh = high();
var vPrevHigh = high(-1);
var vLow = low();
var vPrevLow = low(-1);
if (vHigh == null || vPrevHigh == null || vLow == null || vPrevLow == null) return;
if (vHigh > vPrevHigh && vLow > vPrevLow) setPriceBarColor(HHHLColor);
else if (vHigh < vPrevHigh && vLow < vPrevLow) setPriceBarColor(LHLLColor);
else if (vHigh < vPrevHigh && vLow > vPrevLow) setPriceBarColor(InsideColor);
else if (vHigh > vPrevHigh && vLow < vPrevLow) setPriceBarColor(OutsideColor);
return;
}