Below is what I'm trying to do...
Trigger - MACD_DiNapoli crosses up
Signal for trade entry - Small trigger lines cross up.
CODE TO MAKE THIS HAPPEN
if
(CrossAbove(MACD_DiNapoli(8.3897, 17.5185, 9.0503), MACD_DiNapoli(8.3897, 17.5185, 9.0503).Avg, 1))
{
condition1true = true;
}
if
(condition1true == true && CrossAbove(RyanTriggerLinesSmall(20, 5).Plot1_Up, RyanTriggerLinesSmall(20, 5).Plot2_Up, 1)
{
DrawArrowUp("UpAarrow" + CurrentBar, true, 0, Low[0] - (offset * TickSize)-0.30, Color.Green);
condition1true = false;
}
The problem is, sometimes the small trigger lines cross up many bars after MACD crosses up. I want to limit the number of bars back to 2. What am I missing? Please advise.
Comment