• Memorial Day Sale! Claim the biggest discount of the year with $50 off VIP using code MEM50. Sign up here.

Writing basic formula using multi time-frame

amirfutures

New member
Hello, I'm trying to write the following formula using multi time-frame. Plotting it on a 5 min chart, using 15 min data.

Code:
rec AccVol =  (AccVol[1]+volume)/2;
plot MyVol = AccVol;

Thanks
 
Solution
Hello, I'm trying to write the following formula using multi time-frame. Plotting it on a 5 min chart, using 15 min data.

Code:
rec AccVol =  (AccVol[1]+volume)/2;
plot MyVol = AccVol;

Thanks

try this
Code:
def agg = AggregationPeriod.fifteen;
def AccVol =  (AccVol[1] + volume(period = agg)/2;
plot MyVol = AccVol;

but i think it will produce 3x the actual volume. on each 5min bar, it will add on the 15 minute volume.
i think your original code should add up the volume, ( if the /2 is removed).

halcyonguy

Well-known member
VIP
Lifetime
Hello, I'm trying to write the following formula using multi time-frame. Plotting it on a 5 min chart, using 15 min data.

Code:
rec AccVol =  (AccVol[1]+volume)/2;
plot MyVol = AccVol;

Thanks

try this
Code:
def agg = AggregationPeriod.fifteen;
def AccVol =  (AccVol[1] + volume(period = agg)/2;
plot MyVol = AccVol;

but i think it will produce 3x the actual volume. on each 5min bar, it will add on the 15 minute volume.
i think your original code should add up the volume, ( if the /2 is removed).
 
Solution

Similar threads

Top