Help in this code

I was reading the articles of coding in trading from your official website. I came to one topic that was Price Gap System.

Price Gap Script

Buy Signals

# A 2% gap up in price over the previous day on high volume

LOW >REF(HIGH,1) * 1.02 AND VOLUME > SMA(VOLUME, 5) * 2

By sense this formula is quite good but when the market opens n someone run this formula as alert how will this formula works? As total volume can b calculated in d end of the day. So how any company can give more than double volume from previous 5 SMA just at market starts?

You are correct, on a daily timeframe this strategy can give signal only at the end of day.If you remove the volume SMA it can give signal right at the start of day.

but without volume it gives 70% fake signals :frowning:

Try this on 1 Hour chart