Just been playing around with the Hammer Candle pattern and just want to verify that my code is correct as i am still learning...It seems to be working correctly when back-testing etc.
Is this the way to go for entering trades via candle patterns?
function run()
{
BarPeriod = 1440;
Margin = 50;
NumWFOCycles = 10;
NumBarCycles = 5;
StartDate = 2002;
vars Price = series(price());
Stop = 2*ATR(30);
TakeProfit = 2*ATR(30);
while(asset(loop("EUR/USD")))
if (CDLHammer())
enterLong();
plot("CDLHammer",CDLHammer(),NEW,BLUE);
}
Thank You!