Volume script question

Questions about MultiCharts and user contributed studies.
fibdax
Posts: 155
Joined: 03 Jan 2011
Has thanked: 10 times
Been thanked: 6 times

Volume script question

Postby fibdax » 16 Apr 2019

Hi everyone, I did this script because I wanted to select past trades with monetary counter values. But as I was writing I realized that on a tick by tick chart I double the values, sometimes even triples. See the Juventus stock chart ticker 1000 shares in volume, multicharts records that goes twice. it's normal ? attached code
WL format 1 tick
thanks
Attachments
Filter.txt
(998 Bytes) Downloaded 228 times
release mc.jpg
(16.03 KiB) Downloaded 368 times
double pdn.png
(96.49 KiB) Downloaded 368 times

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Volume script question

Postby syswizard » 19 Apr 2019

Sorry Dude, I couldn't follow that code at all....no annotations, no indenting.....
Also, on a 1 tick chart, isn't TICKS always 1 ?
I don't quite "get it".

fibdax
Posts: 155
Joined: 03 Jan 2011
Has thanked: 10 times
Been thanked: 6 times

Re: Volume script question

Postby fibdax » 28 May 2019

Hi, sorry for the delay with which I write to you.
I made changes to the file, see if it is clearer. The substance is that the code is executed twice. In fact, in the printing of the array of known volumes, the volume is printed twice. On the right you have the time and sale of the JUVE stock where you find only 1000 past shares, only once.
Now they know this problem at MC ?? I think so and it seems absurd to me to behave like that. There is also a problem of resources being consumed, this behavior multiplied by a watchlist of 100, 200, even 1000 stocks or future means having unnecessary steps within the code. Has anyone ever encountered such a problem? MC you either? Advice on this?

the problem can be simulated by inserting a watchlist with the stocks set to 1 tick and filling the indicator, the filtered volumes do not coincide with those on time and sale.
Attachments
Filter.txt
(938 Bytes) Downloaded 192 times

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Volume script question

Postby syswizard » 28 May 2019

re: "The substance is that the code is executed twice."
Just put a boolean variable in there or a counter so that it exits before the second execution occurs.

fibdax
Posts: 155
Joined: 03 Jan 2011
Has thanked: 10 times
Been thanked: 6 times

Re: Volume script question

Postby fibdax » 28 May 2019

the problem does not solve me. In a trade I can have an order consisting of 10 times 1000 shares with the same timestamp as I know what is repeated? I had read some but I lost the links, I think it is an unsolved problem MC aspect what it says.

Thanks anyway for your attention

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Volume script question

Postby syswizard » 28 May 2019

Since you are dealing with tick resolution, I think the problem is side ticks. There are upticks, downticks, and sideticks where the price is the same for subsequent trades. No one counts the sideticks as the standard is to consider them as either a downtick or an uptick based on the most recent uptick or downtick. This is very important to understand. Ex: uptick, sidetick, sidetick, sidetick,downtick, sidetick, sidetick = 3 upticks and 2 downticks. Likewise, UpVol and DownVol are determined in the same fashion. There is no "side volume" measure....although it does exist theoretically.

fibdax
Posts: 155
Joined: 03 Jan 2011
Has thanked: 10 times
Been thanked: 6 times

Re: Volume script question

Postby fibdax » 29 May 2019

I don't think that's when the tick gets multicharts to catalog it as up, down or something else.

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Volume script question

Postby syswizard » 29 May 2019

I don't think that's when the tick gets multicharts to catalog it as up, down or something else.
Please contact technical support on this. They must handle sideticks in this fashion....as there is no other way other than to ignore them.
If they did that then Total Ticks would not match Upticks+Downticks.


Return to “MultiCharts”