Cumulative Volume

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Re: Cumulative Volume

Postby logicgate » Mon Oct 14, 2019 4:11 pm

Hi there buddy. Already tried all combinations and with all timeframes loaded, it still only works if set to "current timeframe", otherwise I get a flatline. Check the screenshot, I have practically all timeframes there on opened charts. You can see I have loaded the indicator on a 4H chart, then I tried choosing 1M, 5M, 15M, 30M, 1H, and I only get a flat line on the indicator, then when set to current timeframe it works.
Attachments
cumvolerror.png
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Volume

Postby Apprentice » Wed Oct 16, 2019 8:37 am

изображение.png

Everything works, the issue in your terminal/history.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cumulative Volume

Postby logicgate » Wed Oct 16, 2019 10:39 am

Can you please help me fix that? What should I do?
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Volume

Postby logicgate » Wed Oct 16, 2019 11:14 am

Hi buddy, it started working now, have no clue why it wasn´t before! :D
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Volume

Postby logicgate » Sat Jul 11, 2020 10:48 am

Apprentice wrote:
Cumulative_Volume_v1.3.mq4

Try this version.


Please dear friend Apprentice, one more option that can be added to this indi is the "reset" time input. For example, I would like the calculation to reset to zero after a new daily bar forms, or NY session starts.

Best regards
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Volume

Postby Apprentice » Sat Jul 11, 2020 3:43 pm

Your request is added to the development list.
Development reference 1669.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cumulative Volume

Postby Apprentice » Mon Jul 13, 2020 8:52 am

it doesn't rely on the previous values. There is nothing to reset.

Currently, we have
1 2 3 4 5 NOW
Average of last X candles.

We may only use the Vwap approach.
1 2 3 [break] 4 5 NOW
NOW
4 NOW
4 5 NOW
Averaging only elements after the break,
with a variable period,
starting with 1, on first candle after the break
then 2 ...
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cumulative Volume

Postby logicgate » Mon Jul 13, 2020 5:46 pm

Hi there dear friend.

I don´t understand, why it can´t start from zero at a determined time interval?

Check the image, I have edited the image on the bottom to show one example of the calculation starting at zero every day break:
Attachments
cumulative volume reset.png
cumulative volume reset at zero.png
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Volume

Postby logicgate » Mon Jul 13, 2020 5:54 pm

Sorry I forgot to add this comment in my last post:

I don´t understand why there is a moving average in this indicator? (the "length" parameter)

I thought that the formula was: up ticks minus down ticks per bar = X value, right (the net value of volume)? Then the net value of each bar was summed to the previous and a running total is plotted. Why not plot the raw cumulated value? No need for a moving average to smooth anything. Anyways, I still don´t understand why the value cannot be brought to zero at a determined reset interval.

Best regards
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Volume

Postby Apprentice » Tue Jul 14, 2020 4:41 am

Will try to write something.
iMA is used as simple method to get period sum.

Avg = Sum/Period
Sum= Avg*Period
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

PreviousNext

Return to Custom Indicators

Who is online

Users browsing this forum: Google [Bot] and 53 guests