Gamestudio Links
Zorro Links
Newest Posts
2 questions
by jcl. 08/14/20 12:50
New Zorro version 2.30
by jcl. 08/14/20 12:48
Reducing Function Times
by txesmi. 08/14/20 12:13
NeoDumont's open world treadmill project
by NeoDumont. 08/13/20 23:33
Corvitextu texture browser released...
by NeoDumont. 08/13/20 23:19
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/13/20 12:00
AUM Magazine
Latest Screens
Untitled Walking Simulator
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
8 registered members (kvm, AndrewAMD, txesmi, 3run, alibaba, danatrader, Superku, 1 invisible), 485 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Janusz, Sovattha, DonSergio, bigimpactsound, tzw101
18492 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Differences in Volume History and Result, why? #480632
06/21/20 22:22
06/21/20 22:22
Joined: Oct 2019
Posts: 18
CH DE PL
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 18
CH DE PL
Hi, i try find out why my result of volume is different from history in same TF, maybe any one can help ?
Data history is SPY t6 in 1 min time frame include Vol per Bar.
in Zorro History Viewer are Vol prints Volume O.K.
SPY data History Download is available here.

Example code
Code
function run() 
{
		  set(LOGFILE+PLOTNOW);		 
		
		  Verbose = 3;
		  TickFix = 1;   
                  StartDate = 20200616;
                  EndDate = 20200617;
			  
		  BarPeriod = 1;  // same as History (RAW)
		
                  asset("SPY");

                       // vars Prices = series(priceClose()); 
		   
		vars Vol = series(marketVol());
		
                plot("MarketVol",Vol,BARS|NEW,BLUE);  
		
}




for Example result, check attachment, them display difference between History and Result.
Anyone know a way to resolve this problem?


Attached Files
Last edited by TedMar; 06/21/20 22:29.

meet me @ discord server TRADING OFFICE GER-ENG https://discord.gg/Dpxjux
Re: Differences in Volume History and Result, why? [Re: TedMar] #480658
06/24/20 06:53
06/24/20 06:53
Joined: Dec 2019
Posts: 20
ozgur Offline
Newbie
ozgur  Offline
Newbie

Joined: Dec 2019
Posts: 20
What does logfile say?

Re: Differences in Volume History and Result, why? [Re: ozgur] #480659
06/24/20 08:42
06/24/20 08:42
Joined: Oct 2019
Posts: 18
CH DE PL
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 18
CH DE PL
Originally Posted by ozgur
What does logfile say?

If u remove TickFix, u get almost right Volume.
I connect already support , and he wrote me :

"if you do not see certain data in the log depending on the TickFix, then obviously two timestamps fall into the same bar. This can also happen without TickFix if the timestamps are irregular."

i mean this is a Bug, its bad when Volume disappear. TimeStamps in History data are clean and every 1 min regular.

without TickFix , Us Session open Price and Volatility at 9:30:00,000 are in previous Bar. I not understand why.. i manual "BarPeriod" i found this

Quote

In [Test] mode, bar generation is based on the UTC time stamps of ticks in the historical price data. All ticks that fall in the bar period contribute to the bar. For instance, a 10-minute bar ending at 12:00 contains all ticks with timestamps from 11:50:00.000 until 11:59:59.999. If the tick covers several prices, its time stamp should be from its close price. If historical time stamps are from the open or the middle price instead, you can use the TickFix variable for adjusting them. In [Trade] mode, bar generation is based on UTC time from the PC clock, not on the broker's server time for avoiding sync problems by connection interruptions and Internet lag.



in example ScreenShot i tryed count Volume from 1m History to 5min BarPeriod. Count function is from manual "marketVol()" Exampele
If i add 5x 1 Min Stamps i get different values to log. Maybe i count wrong..?

Attached Files

meet me @ discord server TRADING OFFICE GER-ENG https://discord.gg/Dpxjux
Re: Differences in Volume History and Result, why? [Re: TedMar] #480661
06/24/20 12:47
06/24/20 12:47
Joined: Feb 2017
Posts: 1,071
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,071
Chicago
Did you notice that all of your volume is multiples of five? Your last M1 tick is getting multiplied by five. That's because the other four volume data points are being thrown out. grin

Also, your volumeSum function is creating a five-minute lag.

Re: Differences in Volume History and Result, why? [Re: AndrewAMD] #480662
06/24/20 13:24
06/24/20 13:24
Joined: Oct 2019
Posts: 18
CH DE PL
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 18
CH DE PL
aha Andrew thank u for info, but how is right code to get true result?


meet me @ discord server TRADING OFFICE GER-ENG https://discord.gg/Dpxjux
Re: Differences in Volume History and Result, why? [Re: TedMar] #480663
06/24/20 13:34
06/24/20 13:34
Joined: Feb 2017
Posts: 1,071
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,071
Chicago
In your first example, you plotted bars, but the second example printed numbers, which was far more useful.

Revise the first example to print volume numbers. This will give you some clues on what Zorro is doing behind the scenes.

Then play around with TickFix a bit more.

Re: Differences in Volume History and Result, why? [Re: TedMar] #480728
07/04/20 23:32
07/04/20 23:32
Joined: Oct 2019
Posts: 18
CH DE PL
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 18
CH DE PL
notice, after many Mails with support ..https://manual.zorro-project.com/new.htm

Quote
Zorro 2.25 (current release) list of bugs
Under some circumstances the 1-minute volume by marketVol was not averaged, but taken from the most recent volume (fixed in 2.28.6).


meet me @ discord server TRADING OFFICE GER-ENG https://discord.gg/Dpxjux

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1