Hope someone can help here I'm to to good with prorealtime coding.
I want this Moving average to appear on a 1hr chrt only.
At the moment its appears on the 1hr charts but also the
timeframes above 1hr ...its dont appear on the timesframes below 1hr which is good?
any ideas would be appreciated
IndicatorToUse = Average[20](Close) // <--- your chosen indicator
iCount = 0 // <--- H1 Counter (must be = 5 for H1)
For iLoop = 1 to 5 DO // <--- Begin the testing loop
IF (Hour[iLoop] <> Hour[iLoop+1]) THEN // <--- Hour above previous
iCount = iCount + 1 // <--- Add 1 every time
ENDIF
NEXT
RETURN (IndicatorToUse * (iCount >= 5)) // <--- only show indi when this is true
I want this Moving average to appear on a 1hr chrt only.
At the moment its appears on the 1hr charts but also the
timeframes above 1hr ...its dont appear on the timesframes below 1hr which is good?
any ideas would be appreciated
IndicatorToUse = Average[20](Close) // <--- your chosen indicator
iCount = 0 // <--- H1 Counter (must be = 5 for H1)
For iLoop = 1 to 5 DO // <--- Begin the testing loop
IF (Hour[iLoop] <> Hour[iLoop+1]) THEN // <--- Hour above previous
iCount = iCount + 1 // <--- Add 1 every time
ENDIF
NEXT
RETURN (IndicatorToUse * (iCount >= 5)) // <--- only show indi when this is true
rat