I have this code to identify bearish Pin Bar and it is seems to be not working as expected.
I am trying to place a short trade when the previous candle is a bearish Pin Bar and therefore using the 1 vs 0 in the code below.
Please see attached screen shots where it placed the trade where previous bar is not a Pin bar.
I am expecting trade to be placed where I have marked previous PIN bar with an yellow pointing arrow.
Any help would be appreciated.
Thank you.
//Short Pin Bar
double UpperWick = High[1] - Open[1];
double LowerBody = Open[1] - Close[1];
bool Short_Pin_Bar_Found = UpperWick > LowerBody;
if (Short_Pin_Bar_Found)
{
EnterShort(Convert.ToInt32(DefaultQuantity), @"Sell");
}
Comment