My prints just before entering long
conditionMetLFalse
useRSIFilterTrue
UseFirstHTFTrue
MatchTrendDirectionTrue
closeTrendlineTrue
if (TLBreakoutSignal)
{
bool conditionMetL = false;
Print("conditionMetL"+conditionMetL);
Print("useRSIFilter"+useRSIFilter);
Print("UseFirstHTF"+UseFirstHTF);
Print("MatchTrendDirection"+MatchTrendDirection);
Print("closeTrendline"+closeTrendline);
if(useRSIFilter)
{
conditionMetL = rsiIndPrim[0] >= rsiMinLong && rsiIndPrim[0] <= rsiMaxLong;
}
if(useATRFilter)
{
conditionMetL = conditionMetL || (atrInd[0] < MaxATRValue);
}
if(UseFirstHTF)
{
if(MatchTrendDirection)
{
conditionMetL = conditionMetL || (trendDirection2 == cRising2);
}
if(UseStochFirstFilter)
{
conditionMetL = conditionMetL || (stoch1HTF.D[0] >= stoch1HTFMin);
}
if(closeTrendline)
{
conditionMetL = conditionMetL || (MatchTrendDirection && Close[0] > trendPrice2);
}
else
{
conditionMetL = conditionMetL || (stoch1HTF.K[0] > stoch1HTF.D[0]);
}
}
if(UseSecHTF)
{
if(extendingBool)
{
conditionMetL = conditionMetL || !extendingShort;
}
else
{
conditionMetL = conditionMetL || !(stochHTF.D[0] <= 20);
}
}
if(useSlopeFilter)
{
conditionMetL = conditionMetL || (regSlope[0] <= 10 && regSlope[0] >= 0.01);
}
else
{
conditionMetL = conditionMetL || ((trendDirection == cFalling) && (Close[0] > trendPrice) && Close[1] < trendPrice && barMedianPrice < trendPrice);
}
LongTLBreakoutSetup = conditionMetL;
}
go long

Comment