0

In TC2000 its possible to use minv3.1 (minimum volume requirement for each of the last 3 bars) which I cannot figure out for pinescript (since its not the same a average volume). How would one create it?

I've only tried

V[0] > 1000 and V[1] > 1000 and V[2] > 1000

But I'm not sure if that's even correct or the best approach.

Ghan
  • 19
  • 4

2 Answers2

0

You are not so far , you should use the volume function (from pinescript) and try :

minimum_vol_requirement = 1000
if volume[2] > minimum_vol_requirement
    if volume[1] > minimum_vol_requirement
        if volume > minimum_vol_requirement
            // here all your conditions are ok
G.Lebret
  • 2,826
  • 2
  • 16
  • 27
0

The ta.lowest() function returns the lowest value for a given number of bars back. You can use this to check the lowest value of volume and then compare it to 1000:

minVolume = ta.lowest(volume, 3)
condition = minVolume > 1000
mr_statler
  • 1,913
  • 2
  • 3
  • 14