I have written an EFS code to recognize specific CandleStick patterns. When I add the EFS to my chart it only shows me the last instance of that pattern. I thought it would mark it for all and every time that pattern occures. If I do a tick replay it will happen however it moves my arrow as new instances of that pattern appear. Is this what I am suppose to get or am I doing something wrong. I would appriciate your advice in this matter.
Thank you
Behzad G.
Here is my code:
function CandleHammer2(PercentageOfBodytoHighLow,Percentage AboveTheLow)
{
var vOpen=open(-1);
var vHigh=high(-1);
var vLow=low(-1);
var vClose=close(-1);
var vHL;
var vOC;
var vPercentageOfBodytoHighLow= .25; //PercentageOfBodytoHighLow;
var vPercentageAboveTheLow= .75 ; //PercentageAboveTheLow;
vOC=vOpen-vClose;
vHL=vHigh-vLow;
if (Math.abs( vOC) < (vPercentageOfBodytoHighLow*vHL)) /* Diff of Open and close is less than */
{
if (vOpen > ((vPercentageAboveTheLow * vHL) + vLow))
{
drawShapeRelative(0, low(0) -1, Shape.UPARROW, null, Color.RGB(0,255,0), Shape.BOTTOM, "T4") ;
}
}
}
Thank you
Behzad G.
Here is my code:
function CandleHammer2(PercentageOfBodytoHighLow,Percentage AboveTheLow)
{
var vOpen=open(-1);
var vHigh=high(-1);
var vLow=low(-1);
var vClose=close(-1);
var vHL;
var vOC;
var vPercentageOfBodytoHighLow= .25; //PercentageOfBodytoHighLow;
var vPercentageAboveTheLow= .75 ; //PercentageAboveTheLow;
vOC=vOpen-vClose;
vHL=vHigh-vLow;
if (Math.abs( vOC) < (vPercentageOfBodytoHighLow*vHL)) /* Diff of Open and close is less than */
{
if (vOpen > ((vPercentageAboveTheLow * vHL) + vLow))
{
drawShapeRelative(0, low(0) -1, Shape.UPARROW, null, Color.RGB(0,255,0), Shape.BOTTOM, "T4") ;
}
}
}
Comment