mercredi 24 juillet 2019

I can't implement the if statement in compiler, similar to the Pine script of the tradingView

I can't implement the if statement in compiler, similar to the Pine script of the tradingView

The code below, the variables volume, open, close, total_volume are arrays, and the condition of the if statement is also an array. How it works, and how the underlying layer is implemented.

//@version=3
study("For Loop tutorial - Example 5")

total_volume = volume - volume

for i = 0 to 10
    if close[i] >= open[i]
        continue
    total_volume := total_volume + volume[i]

plot(total_volume, style=histogram)

Aucun commentaire:

Enregistrer un commentaire