Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, TipmyPip, degenerate_762, AndrewAMD, Nymphodora), 997 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 10 1 2 3 9 10
New Zorro version 2.30 #480844
07/18/20 09:38
07/18/20 09:38
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Zorro 2.30 is now available:

http://opserver.de/down/Zorro_230.exe

This version will become the official release when no bugs are found in the next time. New features: realtime chart generation, interactive payoff diagrams for options, emails on errors, new indicators, and many more new features. The full list can be found on http://manual.zorro-project.com/new.htm.

Please test everything and report any issues here! If you're the first one to find a serious bug of this release candidate, you can get a free Zorro S subscription. Details on https://manual.zorro-project.com/restrictions.htm.

Re: New Zorro version 2.30 [Re: jcl] #480853
07/19/20 09:25
07/19/20 09:25
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
http://manual.zorro-project.com/new.htm
Spearman correlation with arbritrary functions.

https://zorro-project.com/manual/en/transform.htm
Spearman(vars Data, int TimePeriod): var
Spearman's rank correlation coefficient; correlation between the original Data series and the same series sorted in ascending order within TimePeriod (1..256). Returns the similarity to a steadily rising series and can be used to determine trend intensity and turning points. Range = -1..+1, lag = TimePeriod/2. For usage and details, see Stocks & Commodities magazine 2/2011. Source available in indicators.c.


What are those "arbitrary functions"? Already listed above?

Re: New Zorro version 2.30 [Re: jcl] #480855
07/19/20 11:53
07/19/20 11:53
Joined: May 2020
Posts: 27
Germany
M
Morris Offline
Newbie
Morris  Offline
Newbie
M

Joined: May 2020
Posts: 27
Germany
The arbitrary function is whatever you use to generate vars Data. Spearman is just a type of correlation (based on rank, not distances of data points)...

Re: New Zorro version 2.30 [Re: jcl] #480856
07/19/20 13:47
07/19/20 13:47
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
jcl,

You should run diff-checks on all of your manual pages between the online version and the distributed helpfile version, because I am finding lots of differences!

Online but not in help file:
* From what's new page: "Spearman correlation with arbritrary functions. New Ehlers indicators: CTI, CCYI, CCYIR, CCYIState."
* correl() function description

In help file but not online:
* assetSelect() function description
* updated MarginCost description

Originally Posted by danatrader
http://manual.zorro-project.com/new.htm
Spearman correlation with arbritrary functions.
The "What's New" page does not clarify it is referring to correl() and not to Spearman().
Quote
var correl(vars Data, int Length, function)
Spearman correlation of the Data series with an arbitrary function. Used for the CTI, CCYI, and CCYIR indicators. Source in indicators.c; usage and description on Financial Hacker.

Re: New Zorro version 2.30 [Re: jcl] #480859
07/20/20 05:51
07/20/20 05:51
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thanks, we'll update the docs.

Re: New Zorro version 2.30 [Re: jcl] #480869
07/20/20 16:17
07/20/20 16:17
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Zorro 'peeks' by one 'tick' when entering trades by returning 2 in a tmf.

This script:
Code
[size:8pt]function stp(var entStp) {
	
	print(TO_LOG,"\n in tmf: %s, high = %.5f, close = %.5f", strdate(HMS,wdate(0) ), priceHigh(0), priceClose(0) ); 
 
   if (TradeIsPending)
   {
	  if (TradeIsLong) 
		if (priceHigh(0)>priceOpen(0)+entStp )   // or priceClose(0)>
		{
			print(TO_LOG,"\n ---- long Entry Stop is hit!----open=%.5f, high=%.5f  close=%.5f  entStp=%.5f", priceOpen(0), priceHigh(0), priceClose(0), priceOpen(0)+entStp);
			
			return 2;
		} 
   }
  
  return 4;
  
}


function run()
{
	set(LOGFILE, TICKS);
		   
	Verbose = 3;
	
	Spread=Slippage = 0;
	
	BarPeriod = 60; 
		
	StartDate = 2019; //2015
	EndDate   = 2020;//0424; 
	
	
	asset("EUR/USD");
	
	var atr = ATR(24);
	
	LifeTime=1;
	
	Entry = 1.5*atr;
	
	enterLong(stp,0.5*atr);
	
}	[/size] 
generates this output:
Quote
[80: Mon 19-01-07 13:00] 1.14407/1.14474\1.14368/1.14394 -0.0
Enter Long EUR/USD Entry 0.0023498 at 13:00:00
(EUR/USD::L) Long 1@1.14629 Entry stop
in tmf: 13:01:00, high = 1.14429, close = 1.14418
in tmf: 13:02:00, high = 1.14450, close = 1.14448
in tmf: 13:03:00, high = 1.14451, close = 1.14444
in tmf: 13:04:00, high = 1.14451, close = 1.14418
in tmf: 13:05:00, high = 1.14451, close = 1.14438
in tmf: 13:06:00, high = 1.14451, close = 1.14444
in tmf: 13:07:00, high = 1.14453, close = 1.14452
in tmf: 13:08:00, high = 1.14453, close = 1.14443
in tmf: 13:09:00, high = 1.14453, close = 1.14440
in tmf: 13:10:00, high = 1.14453, close = 1.14436
in tmf: 13:11:00, high = 1.14453, close = 1.14439
in tmf: 13:12:00, high = 1.14453, close = 1.14424
in tmf: 13:13:00, high = 1.14453, close = 1.14409
in tmf: 13:14:00, high = 1.14453, close = 1.14423
in tmf: 13:15:00, high = 1.14453, close = 1.14449
in tmf: 13:16:00, high = 1.14453, close = 1.14448
in tmf: 13:17:00, high = 1.14462, close = 1.14453
in tmf: 13:18:00, high = 1.14464, close = 1.14462
in tmf: 13:19:00, high = 1.14464, close = 1.14441
in tmf: 13:20:00, high = 1.14483, close = 1.14480
---- long Entry Stop is hit!----open=1.14394, high=1.14483 close=1.14480 entStp=1.14473
[EUR/USD::L08101] Long 1@1.14441 x at 13:20:00
Com 0.0300 Mrg 37.74 Net 0


The correct entry price should be 1.14480.

Re: New Zorro version 2.30 [Re: jcl] #480871
07/21/20 05:54
07/21/20 05:54
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thanks, we'll look into that, but has it something to do with version 2.30?

Re: New Zorro version 2.30 [Re: jcl] #480876
07/21/20 10:01
07/21/20 10:01
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
I noticed it working on beta 2.28.4 yesterday, then installed 2.30 to see if it might have been corrected.



Re: New Zorro version 2.30 [Re: jcl] #480884
07/22/20 00:43
07/22/20 00:43
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Coming back to the discussion (https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=480527#Post480527), the initial reply was that trades entered with Entry (but missed) have a "TradeIsPending" status,
and then jcl wrote that "Missed Pending trades are not preserved (stored by Zorro)".

In v 2.30, this script:
Code
function run()
{
	set(LOGFILE);
		   
	//Verbose = 3;
	
	BarPeriod = 60; 
		
	StartDate = 2019; 
	EndDate   = 2020;
	
	
	asset("EUR/USD");
	
	var atr = ATR(24);
	
	LifeTime=1;
	
	Entry = 1.0*atr;
	
	enterLong();
	
	if ( (NumWinTotal+NumLossTotal)==4 )
		for(last_trades)
		 //if (TradeIsPending)	//TradeIsMissed
			print(TO_LOG,"\n TradeDate=%.2f, TradePriceOpen=%.5f, TradeProfit=%.2f", (var)TradeDate,(var) TradePriceOpen,(var)TradeProfit );		
	
}
generated this output:
Quote
[117: Wed 19-01-09 07:00] -0.89 0 0/3 (1.14588)
(EUR/USD::L) Long 1@1.14721 Entry stop
(EUR/USD::L) Missed entry 1.1474 after 1 bar
(EUR/USD::L) Entry stop 1.14721 hit by 1.14785 at 07:00:00
[EUR/USD::L11802] Long 1@1.14717 x at 07:00:00

[118: Wed 19-01-09 08:00] -0.89 -0.65 0/4 (1.14659)
(EUR/USD::L) Long 1@1.14798 Entry stop

[119: Wed 19-01-09 09:00] -0.89 -0.95 0/4 (1.14629)
(EUR/USD::L) Long 1@1.14766 Entry stop
[EUR/USD::L11802] Expired 1@1.14617: -1.07
(EUR/USD::L) Missed entry 1.1480 after 1 bar

[120: Wed 19-01-09 10:00] -1.97 0 0/4 (1.14605)
(EUR/USD::L) Long 1@1.14742 Entry stop
TradeDate=0.00, TradePriceOpen=1.14605, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14630, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14657, TradeProfit=0.00
TradeDate=43474.29, TradePriceOpen=1.14717, TradeProfit=-1.07
TradeDate=0.00, TradePriceOpen=1.14608, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14600, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14543, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14516, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14576, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14560, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14575, TradeProfit=0.00
TradeDate=43473.96, TradePriceOpen=1.14546, TradeProfit=-0.01
TradeDate=0.00, TradePriceOpen=1.14403, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14403, TradeProfit=0.00
TradeDate=0.00, TradePriceOpen=1.14423, TradeProfit=0.00.....


Zorro DOES store such missed trades, but their status is undefined (why are they not "Missed"?)

Another issue is wrong "TradePriceOpen" for pending trades.

Re: New Zorro version 2.30 [Re: jcl] #480886
07/22/20 08:13
07/22/20 08:13
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
This is the correct code to enumerate pending trades:

for(last_trades)
if (TradeIsPending)
...

A trade can be either pending, open, or closed. So always use an if(...) condition to get the trades that you want. If a trade is neither, it's no valid trade.

And can you please post these questions to another thread? This one is about the new release.

Re: New Zorro version 2.30 [Re: jcl] #480891
07/22/20 10:03
07/22/20 10:03
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Bug#2:
The manual states:

for(last_trades)
Quote
A for loop that cycles backwards through open, pending, and closed trades with the current asset and algo, starting with the last trade

The provided log shows that it delivers not only "open, pending and closed" trades but also some missed, 'invalid' trades (that are neither) - which - as YOU WROTE - Zorro is not even supposed to store!

Right now, to achieve their stated objective, does one have to write

for(last_trades)
if (TradeIsPending or TradeIsOpen or TradeIsClosed)
.....
???

The same issue is with for(all_trades) and for(past_trades).

I do not believe you meant (and there is any valid purpose) delivering such 'invalid' trades with these macros.

So, let's just make them actually do what they are supposed to.


This is a bug and it is in v 2.30.

Re: New Zorro version 2.30 [Re: jcl] #480893
07/22/20 12:21
07/22/20 12:21
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok, I'll improve the wording in the manual. Next posts in this thread please only about real issues with 2.30. Thank you.

Re: New Zorro version 2.30 [Re: jcl] #480894
07/22/20 13:01
07/22/20 13:01
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Why not just fix the macros?

Re: New Zorro version 2.30 [Re: jcl] #480897
07/22/20 13:40
07/22/20 13:40
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
You mean filtering the trades already in the macro? That could break existing scripts.

Re: New Zorro version 2.30 [Re: jcl] #480899
07/22/20 14:09
07/22/20 14:09
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
The macros should deliver only 'real' trades - either pending, open or closed. Without **trades** 'attempted' with Entry but missed.
Bug#2.5
With this bug all functions currently using these macros (like plotTradeProfile(), plotMAEGraph(), etc, possibly results() ) return results with artifacts, processing 'trades' with zero profit/mae/mfe, but counting such as 'trades' .
Code
for(all_trades) 
		{
			var vResult = toPIP(TradeResult);
			var vMAE = TradeMAE/PIP/vStep;
			int n = floor(vMAE);
			plotBar("Profit",n,n*vStep,0,AVG|BARS|LBL2,COLOR_PROFIT);
			if(vResult > 0)
				plotGraph("Win",vMAE,vResult,DOT,GREEN);
			else
				plotGraph("Loss",vMAE,vResult,DOT,RED);
		}



So, either really do not preserve such **trades" (as you confirmed), or make for(..._trades) macros skip those.

Re: New Zorro version 2.30 [Re: jcl] #480907
07/22/20 17:08
07/22/20 17:08
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Indeed. It made probably not much difference, but an if(TradeIsClosed) should be in the plotMAE functions - this will be corrected. It is really a bug.

Re: New Zorro version 2.30 [Re: jcl] #480918
07/24/20 10:19
07/24/20 10:19
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
But what about the macros delivering ONLY REAL trades as intended?

What the use case for getting *attempted but missed* orders (that have no internal status anyway)??

Last edited by Zheka; 07/24/20 10:20.
Re: New Zorro version 2.30 [Re: jcl] #480924
07/24/20 13:52
07/24/20 13:52
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
That will be unchanged.

Re: New Zorro version 2.30 [Re: jcl] #480927
07/24/20 15:32
07/24/20 15:32
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Bug#3:
results() does not work correctly:
Code
function run()
{
	BarPeriod = 60; 
		
	StartDate = 2019; 
	EndDate   = 2020;
	
	
	asset("EUR/USD");
	
	var atr = ATR(24);
	
	LifeTime=4;
	
	Entry = -0.5*atr;
	
	if (lhour(ET,0)==15)
		enterLong();
	
	if ( (NumWinTotal+NumLossTotal)==30 )
	{
		var NumWins = results(1+24,30);	// Number of winning and won trades
		var NumLosses = results(1+4+24,30);	// Number of losing and lost trades

		var pipWins = results(2+24,30)/PIP;	   // Total win in pips
		var pipLosses = results(2+4+24,30)/PIP;	// /PIPTotal loss in pips
		
		print(TO_LOG,"\n NumWins=%i, NumLosses=%i, resNumWins=%.0f, resNumLosses=%.0f, pipWins=%.2f, pipLosses=%.2f", NumWinTotal,NumLossTotal,NumWins,NumLosses,pipWins,pipLosses);
		
	}
} 
prints:
Quote
[2825: Thu 19-06-20 00:00] 3.15 -0.60 15/15 (1.12358)
[EUR/USD::L82129] Expired 1@1.12359: -0.59
[2826: Thu 19-06-20 01:00] 2.56 0 15/15 (1.12575)
NumWins=15, NumLosses=15, resNumWins=6, resNumLosses=24, pipWins=52.45, pipLosses=213003.51



Last edited by Zheka; 07/27/20 20:15.
Re: New Zorro version 2.30 [Re: jcl] #480951
07/27/20 09:55
07/27/20 09:55
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
What is wrong in which way?

Re: New Zorro version 2.30 [Re: jcl] #480953
07/27/20 10:09
07/27/20 10:09
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
New version 2.30.1: http://opserver.de/down/Zorro_230.exe

The bugs reported for 2.30.0 have been fixed: dataParse with text strings and storing GTC trades.

Re: New Zorro version 2.30 [Re: jcl] #480954
07/27/20 10:25
07/27/20 10:25
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
At the moment when there are no open or pending trades,
1) results(1+24,30) is 6, while NumWinTotal is 15; same for losing trades
2) results(2+4+24,30)/PIP cannot conceivably be 213003

Re: New Zorro version 2.30 [Re: jcl] #480956
07/27/20 13:13
07/27/20 13:13
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Your results call sums up the last 30 trades. Not the total of all trades.

Re: New Zorro version 2.30 [Re: jcl] #480957
07/27/20 13:30
07/27/20 13:30
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
If it is too difficult to read 2 messages above, here is the piece of code again:
Code
if ( (NumWinTotal+NumLossTotal)==30 )
	{
	var NumWins = results(1+24,30);	// Number of winning and won trades
	var NumLosses = results(1+4+24,30);	// Number of losing and lost trades

	var pipWins = results(2+24,30)/PIP;	   // Total win in pips
	var pipLosses = results(2+4+24,30)/PIP;	// /PIPTotal loss in pips
		
	print(TO_LOG,"\n NumWins=%i, NumLosses=%i, resNumWins=%.0f, resNumLosses=%.0f, pipWins=%.2f, pipLosses=%.2f", NumWinTotal,NumLossTotal,NumWins,NumLosses,pipWins,pipLosses);
		
	}
which gives:
Quote
[2826: Thu 19-06-20 01:00] 2.56 0 15/15 (1.12575)
NumWins=15, NumLosses=15, resNumWins=6, resNumLosses=24, pipWins=52.45, pipLosses=213003.51




Re: New Zorro version 2.30 [Re: jcl] #480958
07/27/20 13:37
07/27/20 13:37
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok, we'll check what's wrong with the pips of losses. But for summing up closed trades you must use +16, not +24.

https://manual.zorro-project.com/results.htm

Re: New Zorro version 2.30 [Re: jcl] #480959
07/27/20 14:18
07/27/20 14:18
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
I want to sum up BOTH open and closed trades.

BUT in this specific moment, there are no open trades (have a look at my original message: the log showed that the open trade has just been closed at 19-06-20 00:00.)

So, using +16 or +24 (or not using any) should return a number equal to NumWinTotal over 30 trades.


Addition: just tried this example with +8 (only open trades ) -> It returns exactly the same numbers for # of trades and pips as with +24, - at the moment when there are NO OPEN TRADES (and it should return zeros).

Pls confirm you can replicate this.

Last edited by Zheka; 07/27/20 17:33.
Re: New Zorro version 2.30 [Re: jcl] #480962
07/27/20 17:35
07/27/20 17:35
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Bug#4: when using plot() functions with LOGFILE set, Zorro does not export values for the first and the last "bins" to the ".._plot.csv" file.

Re: New Zorro version 2.30 [Re: jcl] #480970
07/28/20 08:07
07/28/20 08:07
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Script Process.c not work correct.

Attached Files process.jpg
Re: New Zorro version 2.30 [Re: jcl] #480984
07/29/20 08:17
07/29/20 08:17
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thank you for testing!

- Calling results() with +8: The bug was confirmed. It will be fixed in the next update.
- No first and last bin in the plot.csv: Not confirmed. But it could depend on the script, can you post it?
- Process.c does not work: Not confirmed. Can you contact Support? It can be some PC specific issue, so we'll need more details.

Re: New Zorro version 2.30 [Re: jcl] #480989
07/29/20 16:46
07/29/20 16:46
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Originally Posted by jcl

- No first and last bin in the plot.csv: Not confirmed. But it could depend on the script, can you post it?
Indeed, it only shows in some very special cases.
Code
#include <profile.c>

function run()
{
	set(LOGFILE);
	set(PEEK);
   	
	BarPeriod = 60; 
		
	StartDate = 2019; 
	EndDate   = 2020;
		
	if (true) {
		var ibs=IBS();
		
		var st = 0.05;
		var Ret = (priceClose(-1)-priceClose(0));
		var Bin = floor(ibs /st) ;  

		plotBar(Asset, Bin , st*(Bin),Ret,AVG+LINE+NEW,GREEN);//
	}
	 else
		 plotDay(priceClose(0),0);
	
}

plotSeason and plotDay/Week/etc functions also have several bugs: one is that 'period one' at the start of a "season" is not counted/always zero.

Attached Files plotDay_tocsv_bug.JPGplotBar_tocsv_bug.JPG
Re: New Zorro version 2.30 [Re: jcl] #480997
07/30/20 16:21
07/30/20 16:21
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
jcl,

is there an update/feedback on the very first - and very serious - bug I reported?

By using the price of 'tick' (1Min) earlier than Entry stop is hit, Zorro greatly inflates the results of such entries..

Re: New Zorro version 2.30 [Re: jcl] #481039
08/03/20 09:45
08/03/20 09:45
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
- Zorro greatly inflates the results: I hope not. At least the result in your post was apparently not inflated, but just random.

Re: New Zorro version 2.30 [Re: jcl] #481045
08/03/20 12:41
08/03/20 12:41
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Was the report reviewed in earnest? Or at all??
Quote
80: Mon 19-01-07 13:00] 1.14407/1.14474\1.14368/1.14394 -0.0
Enter Long EUR/USD Entry 0.0023498 at 13:00:00
(EUR/USD::L) Long 1@1.14629 Entry stop <- initial entry stop from Entry=1.5*atr
in tmf: 13:01:00, high = 1.14429, close = 1.14418
in tmf: 13:02:00, high = 1.14450, close = 1.14448
in tmf: 13:03:00, high = 1.14451, close = 1.14444
in tmf: 13:04:00, high = 1.14451, close = 1.14418
in tmf: 13:05:00, high = 1.14451, close = 1.14438
in tmf: 13:06:00, high = 1.14451, close = 1.14444
in tmf: 13:07:00, high = 1.14453, close = 1.14452
in tmf: 13:08:00, high = 1.14453, close = 1.14443
in tmf: 13:09:00, high = 1.14453, close = 1.14440
in tmf: 13:10:00, high = 1.14453, close = 1.14436
in tmf: 13:11:00, high = 1.14453, close = 1.14439
in tmf: 13:12:00, high = 1.14453, close = 1.14424
in tmf: 13:13:00, high = 1.14453, close = 1.14409
in tmf: 13:14:00, high = 1.14453, close = 1.14423
in tmf: 13:15:00, high = 1.14453, close = 1.14449
in tmf: 13:16:00, high = 1.14453, close = 1.14448
in tmf: 13:17:00, high = 1.14462, close = 1.14453
in tmf: 13:18:00, high = 1.14464, close = 1.14462
in tmf: 13:19:00, high = 1.14464, close = 1.14441
in tmf: 13:20:00, high = 1.14483, close = 1.14480 <--this is when a trade is entered by a tmf returning 2
---- long Entry Stop is hit!----open=1.14394, high=1.14483 close=1.14480 entStp=1.14473
[EUR/USD::L08101] Long 1@1.14441 x at 13:20:00

The price of entry should be 1.14480 while Zorro's recorded price of entry is 1.14441 - a 4 PIP difference!

And no, it is NOT random. It is 1 tick earlier EACH TIME.

I discovered this when live trading results significantly deviated from a subsequent re-test (and backtesting expectations).

"Hopes" cost dearly. Just run the provided script and - 1.5 weeks since the report - you may as well provide a normal and constructive feedback...

Last edited by Zheka; 08/03/20 12:58.
Re: New Zorro version 2.30 [Re: jcl] #481046
08/03/20 13:28
08/03/20 13:28
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Don't worry, we review all reports and are very, very earnest. - Can you then post a log where it is not random, but 1 tick earlier each time?

Re: New Zorro version 2.30 [Re: jcl] #481047
08/03/20 13:54
08/03/20 13:54
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
The first equity curve is from the provided script (entry from a tmf returning 2 as soon as price crosses 0.5*atr),
second is the same script without using a tmf, just with Entry = 0.5*atr.
Slippage=0 in both cases.

See the "inflation"?

The first approach should actually give worse results since price definitely has to cross the stop entry level (maybe by a lot) for an entry to trigger.

Attached Files Zorro_tmf2_entry.JPGZorro_05atr_entry.JPG
Re: New Zorro version 2.30 [Re: jcl] #481048
08/03/20 13:59
08/03/20 13:59
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Hmm, I see two balance charts, one good, one bad. I was hoping for a log that shows a "1 tick early" bug.

Re: New Zorro version 2.30 [Re: jcl] #481050
08/03/20 14:01
08/03/20 14:01
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
New version 2.30.3:

http://opserver.de/down/Zorro_230.exe

The bugs reported so far have been fixed:

- Sometimes no first and last bin in the plot.csv of a histogram
- Wrong plotHeatmap example in the manual
- Wrong PriceDist script
- Missing CuirrencyStrength script
- enterTrade() did not update the LotsPool variable
- Brute Force sometimes printed a wrong result to the window

Re: New Zorro version 2.30 [Re: jcl] #481051
08/03/20 14:24
08/03/20 14:24
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
By asking to post a log - do you mean that the provided script generates a completely different result at your computer?

Here is it anyway (for 2020, to fit attachment size limits).

If you find several cases where entry price is worse than the intended entry ( which is what you mean by "random", right?) - pls point the dates out.

Attached Files
Re: New Zorro version 2.30 [Re: jcl] #481052
08/03/20 14:28
08/03/20 14:28
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thank you for the log. Where in it is the bug? Do you have the line numbers?

Re: New Zorro version 2.30 [Re: jcl] #481053
08/03/20 14:29
08/03/20 14:29
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Is results() +8 bug fixed in 2.30.3?

Re: New Zorro version 2.30 [Re: jcl] #481054
08/03/20 14:31
08/03/20 14:31
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Yes. Sorry, I forgot to mention it in the post.

Re: New Zorro version 2.30 [Re: jcl] #481055
08/03/20 14:56
08/03/20 14:56
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
You cannot reasonably ask for 'each line number with a bug'.

At each bar when an entry triggers, compare the price of "0.5*atr entry stop" (intended) with the actual entry price at "Long1@".
Quote
[99: Wed 20-01-08 14:00] -6.41 -0.0500 3/9 (1.11200)
(EUR/USD::L) Long 1@1.11362 Entry stop
0.5*atr entry stop=1.11254
[EUR/USD::L10002] Long 1@1.11249 x at 14:31:00
Actual entry price is always more favorable.

To demonstrate that this is actually the price from "1-tick earlier", here is a more detailed log with each tick printed.


Attached Files
Last edited by Zheka; 08/03/20 14:56.
Re: New Zorro version 2.30 [Re: jcl] #481056
08/03/20 15:24
08/03/20 15:24
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
This is the script used (same as in the very first message).

It's "inflated" equity curve is just an 'automated' way to show that 'peeking' is consistent; and the magnitude is clear by comparing to a benchmark (Entry=0.5*atr; enterLong(); ) where Entry prices are correct.

Attached Files
ea_tmf2_stopEntry.c (155 downloads)
Re: New Zorro version 2.30 [Re: jcl] #481057
08/04/20 05:44
08/04/20 05:44
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok, do I understand it right: The problem was not that the entry stop happened 1 tick early, the problem was that your TMF opened the trade 1 tick early?

Re: New Zorro version 2.30 [Re: jcl] #481058
08/04/20 10:02
08/04/20 10:02
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Sorry, I do not understand the question.

When a price exceeds a certain level (0.5*atr), a trade is entered by the tmf returning 2.

However, Zorro internally records the entry price from 1 tick before the entry time.
Quote
in tmf: 13:18:00, high = 1.14464, close = 1.14462
in tmf: 13:19:00, high = 1.14464, close = 1.14441
in tmf: 13:20:00, high = 1.14483, close = 1.14480 <--this is when a price exceed 1.14473 and the trade is entered by tmf returning 2
---- long Entry Stop is hit!----open=1.14394, high=1.14483 close=1.14480 entStp=1.14473
[EUR/USD::L08101] Long 1@1.14441 x at 13:20:00
Trade :L080101 is entered at 13:20 with the price at 13:19.

Re: New Zorro version 2.30 [Re: jcl] #481059
08/04/20 10:14
08/04/20 10:14
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok. I assumed it was an entry stop issue. We cannot confirm a TMF fill price from 1 tick earlier either, so possibly something else is wrong. But I think at least I understand now the problem and we can check it. Sorry for being dull.

Re: New Zorro version 2.30 [Re: jcl] #481060
08/04/20 10:42
08/04/20 10:42
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
The script cannot be simpler, and the logs are what they are.

Quote
We cannot confirm a TMF entry price from 1 tick earlier either
I see 0 downloads of my script; so not sure what exactly has been used to confirm the problem.
May I pls ask you to actually run the provided script and post the same part of the log that I posted, for 19-01-07 13:00?

Last edited by Zheka; 08/04/20 10:47.
Re: New Zorro version 2.30 [Re: jcl] #481061
08/04/20 11:05
08/04/20 11:05
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Don't worry about your script. We have our test programs for this. We'll find the problem.

Until this is resolved, use the normal Entry variable for an entry stop, not your TMF.

Re: New Zorro version 2.30 [Re: jcl] #481063
08/04/20 14:23
08/04/20 14:23
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
2 more issues:
Code
function stp(var entStp, var entT) {
	
	print(TO_LOG,"\n in tmf: %s, high = %.5f, close = %.5f", strdate(HMS,wdate(0) ), priceHigh(0), priceClose(0) ); 
 
        watch("#entT=",strdate(HMS,entT));
 
       return 4; //or 0  
}

function run()
{
	set(LOGFILE, TICKS);
		   
	Verbose = 3;
	
	Spread=Slippage = 0;
	
	BarPeriod = 60; 
		
	StartDate = 2020; 
	EndDate   = 2020;		
			
watch("#wdate=",strdate(HMS,wdate(0)));	

	enterLong(stp,10*PIP,wdate(0));		
} 
logs this:
Quote
[80: Tue 20-01-07 19:00c] 1.11425/1.11497\1.11413/1.11435 -0.0
wdate= 19:00:00
[EUR/USD::L08001] Long 1@1.11435 x at 19:00:00

in tmf: 19:01:00, high = 1.11442, close = 1.11440
entT= 19:01:52
in tmf: 19:02:00, high = 1.11443, close = 1.11428
entT= 19:01:52
1) Why would Zorro enter any trade at all?

2) Time passed as a parameter to the tmf becomes some 2 min ahead inside the tmf!??? --see in red

Re: New Zorro version 2.30 [Re: jcl] #481072
08/05/20 10:34
08/05/20 10:34
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
I accidentally deleted LifeTime=1 from the code above; the log is correct.

Re: New Zorro version 2.30 [Re: jcl] #481073
08/05/20 12:17
08/05/20 12:17
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
To answer the second question: TMF parameters are for numbers only. They are stored in floats and cannot hold a DATE variable in full precision.

Re: New Zorro version 2.30 [Re: jcl] #481076
08/05/20 15:30
08/05/20 15:30
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
The manual says otherwise:
Quote
If the TMF is passed to an enter command, it can receive up to 8 additional var parameters following the function name: enterLong(MyTMF, parameter1, parameter2...). They must also appear in the function's parameter list and keep their values during the lifetime of the trade. The global manage function has no parameters.
Also, 2-minute difference is 0.00138888. If there is any rounding involved internally, downcasting a var to a float, this shouldn't cause difference up in the 3-rd significant digit.

Re: New Zorro version 2.30 [Re: jcl] #481077
08/05/20 15:44
08/05/20 15:44
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
var are being cast to float here.

It is about 44046 days since January 1, 1900, so your date value of 44046.00138888 vs 44046.00000000 requires more significant digits than you suggest.

Re: New Zorro version 2.30 [Re: jcl] #481079
08/05/20 17:58
08/05/20 17:58
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
I meant 3rd decimal digit, sorry.

But this line:
Quote
print(TO_LOG,"\n wdate as var=%.7f, wdate in float=%.7f, %s", wdate(0), (var)(float)wdate(0), strdate(HMS,(var)(float)wdate(0) ) );
when run in lite-C indeed shows 1:52 min difference after downcasting, but in C++ both values are exactly the same.

The difference is quite significant, how come?

Re: New Zorro version 2.30 [Re: jcl] #481081
08/05/20 18:40
08/05/20 18:40
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Maybe your recast is incomplete in C++? Declare and initialize a float to the value, and use that instead. Then your floating precision should actually decay.

Also, significant figures are quite relevant:
https://www.geeksforgeeks.org/difference-float-double-c-cpp/
Quote
float is a 32 bit IEEE 754 single precision Floating Point Number (1 bit for the sign, 8 bits for the exponent, and 23* for the value), i.e. float has 7 decimal digits of precision.

double is a 64 bit IEEE 754 double precision Floating Point Number (1 bit for the sign, 11 bits for the exponent, and 52* bits for the value), i.e. double has 15 decimal digits of precision.

Re: New Zorro version 2.30 [Re: jcl] #481083
08/05/20 19:47
08/05/20 19:47
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
If I declare and initialize a var to a value, and then recast to float and back, I indeed see the difference. Why doesn't it happen if recasting the result of wdate()?

Re: New Zorro version 2.30 [Re: jcl] #481085
08/05/20 21:28
08/05/20 21:28
Joined: Mar 2018
Posts: 62
hast29 Offline
Junior Member
hast29  Offline
Junior Member

Joined: Mar 2018
Posts: 62
Hi,

is the 2.30.3 release considered to update the running Z Strategies and their parameters?

If yes, the Z7 strategy has some new PDD algorithm, which behaves strange.

This algorithm has opened and saved into „trades.csv“ long and short trades at the same minute bar with the same asset. It happened several times during the back test.

Attached Files hedge.png
Re: New Zorro version 2.30 [Re: jcl] #481086
08/06/20 08:03
08/06/20 08:03
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
-Z7 behaves strange: it now trades 2 PDD variants with different patterns. But they should normally not trade against each other. We'll look into that.

-Zheka's TMF entered at wrong price: Caused by setting an entry stop, but entering via TMF. Set TradeEntryLimit to 0 before returning 2. This will be fixed in the next update.

Re: New Zorro version 2.30 [Re: jcl] #481096
08/06/20 14:09
08/06/20 14:09
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Originally Posted by jcl
Caused by setting an entry stop, but entering via TMF
Its pretty normal to have some initial Entry, but modified later in a tmf.
I actually needed a 'bracket' order, setting a limit via Entry and then adding a stop in a tmf. Which led to some 'great results' in backtesting, but failed in live.
Would be great if Zorro had a bracket order functionality out of the box.
Quote
This will be fixed in the next update
You mean the entry price will be correct and not 1-tick earlier (without having to set TradeEntryLimit=0 before that)?

Last edited by Zheka; 08/06/20 14:20.
Re: New Zorro version 2.30 [Re: jcl] #481100
08/06/20 16:11
08/06/20 16:11
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
No, I meant that you can then have an entry limit and enter via TMF at the same time. Modifying limits or bracket orders have nothing to do with that.

Re: New Zorro version 2.30 [Re: jcl] #481104
08/06/20 17:39
08/06/20 17:39
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Entering with initial Entry and modifying TradeEntryLimit in a tmf works exactly as suggested in the manual.
Quote
TradeEntryLimit
Entry limit; initially calculated from Entry. The trade will be opened when the price reaches this value. Can be modified by the TMF by setting it to the desired price (not to a distance!).
So, you mean that this tmf functionality:
Quote
return 4: Don't use Entry, Stop, or TakeProfit for automatically entering or exiting. Exit or enter only when the TMF returns 1 or 2.
will work as expected
i.e. entering a trade with "return 2" in a tmf will not conflict with a TradeEntryLimit set and will occur at the correct price?

Re: New Zorro version 2.30 [Re: jcl] #481105
08/06/20 17:40
08/06/20 17:40
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
In v 2.30.1, watch() is not recognized/ cannot be used in C++ under VS.

Re: New Zorro version 2.30 [Re: Zheka] #481112
08/07/20 02:09
08/07/20 02:09
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Originally Posted by your friend the manual:
Use printf() or print(TO_WINDOW,...) instead. https://manual.zorro-project.com/dlls.htm

smile

Re: New Zorro version 2.30 [Re: jcl] #481123
08/07/20 08:54
08/07/20 08:54
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Indeed, sorry.

Re: New Zorro version 2.30 [Re: jcl] #481131
08/07/20 11:23
08/07/20 11:23
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
-Z7 behaved strange on Sep 22 2011: No, that 's intentional. Look for the details in the log. "PD" opened a short position, and "PDD" immediately closed it and opened a long position. This happens very rarely, but it can happen. You can prevent shortlived positions when you set Hedge to 5.

Re: New Zorro version 2.30 [Re: jcl] #481145
08/07/20 13:26
08/07/20 13:26
Joined: Mar 2018
Posts: 62
hast29 Offline
Junior Member
hast29  Offline
Junior Member

Joined: Mar 2018
Posts: 62
Thank you JCL, I can not set Hedge 5, because the MT4 (or borker) does not support partial position closing. I have Hedge 4 though. Nevertheless, good that you checked, the short live positions do not bother me. I was afraid, there is some serious issue/mistake in the new release of Z7. Cheers, Jaroslav

Re: New Zorro version 2.30 [Re: jcl] #481170
08/09/20 18:51
08/09/20 18:51
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
I found problem with version laugh .
During install I don't see any information which version I instaled.
All is "Zorro_230" - but no info about updates.

Re: New Zorro version 2.30 [Re: jcl] #481177
08/10/20 14:20
08/10/20 14:20
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
That's true. The installation software knows the version number, but there's apparently no place where it is displayed.

The latest version, 2.30.5, contains a new MQL5 library that supports 64-bit order tickets. This supposedly fixes the longstanding problem of a certain broker whose MT5 order tickets exceed the int size.

Re: New Zorro version 2.30 [Re: jcl] #481185
08/11/20 15:49
08/11/20 15:49
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
sftoa (1,1) returns 1.0
sftoa(1.0,1) returns 1.0

while sftoa(2,1) correctly returns 2

Last edited by Zheka; 08/11/20 15:54.
Re: New Zorro version 2.30 [Re: jcl] #481191
08/12/20 13:01
08/12/20 13:01
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
plot (string Name, var Value, int Type, int Color) accepts non-string values for "string Name" resulting in (potentially) unhappy plots.

Last edited by danatrader; 08/12/20 13:05.
Re: New Zorro version 2.30 [Re: jcl] #481204
08/13/20 10:47
08/13/20 10:47
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Other appoitment for setup file.
Is a possible update without data in history? I have verificate history data, but after update I must run verificate again. frown

Re: New Zorro version 2.30 [Re: jcl] #481207
08/13/20 11:04
08/13/20 11:04
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
-sftoa (1,1) returns "1.0": This is indeed a bug, and there are also other tiny inconsistencies with that function. It will be fixed, but not anymore for the current release, because the function is from a library and replacing it had side effects.

- plot(Name..) is unhappy when Name is not a string: lite-C functions indeed normally accept any 32-bit address for a string pointer. Same as above - it will be eventually fixed, but not anymore for the current release because this had to be done with most functions that use strings.

- update without data in history: EUR/USD data is included because the update is a normal installation. For avoiding that your history is overwritten, install it in a temporary folder, then copy over all folders except History.



Re: New Zorro version 2.30 [Re: jcl] #481210
08/13/20 11:27
08/13/20 11:27
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
It seems a new error has crept into the release candidate.
https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=481209#Post481209

Re: New Zorro version 2.30 [Re: jcl] #481219
08/13/20 18:23
08/13/20 18:23
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
ScholzTax not in performance report.

if(is(INITRUN) || year(0) != year(1))
ScholzBrake = 30000;

is above the loss limit active for germans next year.

I would assume in the performance report the Tax is calculated.

Re: New Zorro version 2.30 [Re: jcl] #481225
08/14/20 09:14
08/14/20 09:14
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Pulling the scholz brake eliminates the Scholz Tax. At least that's the intention.

https://manual.zorro-project.com/performance.htm

Re: New Zorro version 2.30 [Re: jcl] #481226
08/14/20 10:01
08/14/20 10:01
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
I see, still would be good to calculate it live?
Could decide to let run longer as long as performing well?

Re: New Zorro version 2.30 [Re: jcl] #481229
08/14/20 12:48
08/14/20 12:48
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
That's right, but what you see in the performance report is just an approximation by subtracting 10,000 * years from the gross profit. For the decision whether to pay tax or not, you had to really calcculate it separately for any year. This is best done by script.

Re: New Zorro version 2.30 [Re: jcl] #481232
08/14/20 20:11
08/14/20 20:11
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
Unhappy plots -->> maybe should not change that, maybe just point it out in the manual, more efficient and may not break things people already developed.

Re: New Zorro version 2.30 [Re: jcl] #481260
08/19/20 11:43
08/19/20 11:43
Joined: May 2018
Posts: 21
Y
YG8 Offline
Newbie
YG8  Offline
Newbie
Y

Joined: May 2018
Posts: 21
I am having issues testing the Z13 system.

I still have an older version of Zorro 2.20 which I have no problem testing the system on.

I have check several times that the data is available (downloaded the resent data from Zorro), that the asset list is correct and cant find any issues. Anyone else experiancing this?

Zorro S 2.30.7
(c) oP group Germany 2020
Zorro S Subscription


Z13 .x ..PH H 4 B 0 V 1
Error 055: No bars generated
Error 047: No bars to plot

Re: New Zorro version 2.30 [Re: jcl] #481262
08/19/20 15:42
08/19/20 15:42
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
There is a bug in plot() when StartDate is set in the format YYYYMMDD.

This script:
Code
function run(){
	
	set(PLOTNOW);
		
	StartDate = 20190201; 
	EndDate   = 2020;
	
	BarPeriod = 60;

	var K=ifelse(!(Bar%120),1,0);
	
	plot("WHL",K,BARS+NEW,RED);	
}
with StartDate=2019 plots as expected (screen 1) . But when StartDate is set as StartDate=20190201, plot() drops most items to be plotted (pic 2), even after enlargement of the plot area.

The problem can be reliably replicated for Bar%120 ( nothing is plotted), but is intermittent for lower values of the divisor (e.g. 24) (and can work for GBPUSD but not for EURUSD)


Attached Files Z_plot120barBug_StartDate2019.JPGZ_plotKbarBug_StartDate20190201.JPG
Last edited by Zheka; 08/19/20 15:45.
Re: New Zorro version 2.30 [Re: jcl] #481274
08/21/20 09:50
08/21/20 09:50
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
- Backtesting Z13: Yes, a wrong history was loaded. You can either rename "SPYa.t8" to "SPYb.t8", or download 2.30 again. It now contains a Z13 with the correct history name.
- Bug in plot when the StartDate is set in the format YYYYMMDD: If you cannot fix it, contact support. They'll help.

Re: New Zorro version 2.30 [Re: jcl] #481277
08/21/20 10:05
08/21/20 10:05
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Originally Posted by jcl
- Bug in plot when the StartDate is set in the format YYYYMMDD: If you cannot fix it, contact support. They'll help.
Before I do that pls confirm that 1) this was indeed checked and/or 2) the issue in the script is obvious to you

Re: New Zorro version 2.30 [Re: jcl] #481278
08/21/20 10:45
08/21/20 10:45
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
No, the issue is not obvious. I see nothing wrong at quick glance when I run your script. But if a plot does not look right, follow first the bug fixing instructions in the manual. In your case, that would be printing the plot values in the log and checking them against the plot, by zooming at a certain date if needed. If you cannot fix it this way, the final solution is getting a support ticket and asking my colleagues for help. That will always work.

If you contact support and it turns out that the issue is caused by something amiss in the manual or by a Zorro bug, we refund the support ticket of course. But I must tell that this does not happen often.




Re: New Zorro version 2.30 [Re: jcl] #481280
08/21/20 11:12
08/21/20 11:12
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
jcl, c'mon!

The script is 3 lines, and it does not plot as expected (at least on my end).
Before posting here, I do the homework: the _plot.csv file contains all the correct values and zooming into an area reveals the correctly plotted values as well.

BUT the Total view doesn't show anything, as in the pic I attached.

Can you just spend 1 min and either confirm it or not?

Re: New Zorro version 2.30 [Re: jcl] #481281
08/21/20 11:36
08/21/20 11:36
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
No, I can not confirm it. You posted a trivial script that did not show me any bug or tell anything about that problem. Why must such an issue always cause discussions? You have a problem, you report it, I suggest that you contact the support - that's it. They can do a lot more than I, like checking your logs or your historical data or whatever might cause the problem. They will find it. If you do it or not is of course completely up to you.

Re: New Zorro version 2.30 [Re: Zheka] #481286
08/22/20 21:22
08/22/20 21:22
Joined: Dec 2019
Posts: 53
ozgur Offline
Junior Member
ozgur  Offline
Junior Member

Joined: Dec 2019
Posts: 53
Originally Posted by Zheka
There is a bug in plot() when StartDate is set in the format YYYYMMDD.

This script:
Code
function run(){
	
	set(PLOTNOW);
		
	StartDate = 20190201; 
	EndDate   = 2020;
	
	BarPeriod = 60;

	var K=ifelse(!(Bar%120),1,0);
	
	plot("WHL",K,BARS+NEW,RED);	
}
with StartDate=2019 plots as expected (screen 1) . But when StartDate is set as StartDate=20190201, plot() drops most items to be plotted (pic 2), even after enlargement of the plot area.

The problem can be reliably replicated for Bar%120 ( nothing is plotted), but is intermittent for lower values of the divisor (e.g. 24) (and can work for GBPUSD but not for EURUSD)



Fyi, above code seems to be working for me.

[Linked Image]

Re: New Zorro version 2.30 [Re: jcl] #481288
08/23/20 07:46
08/23/20 07:46
Joined: May 2020
Posts: 45
A
AdamWu Offline
Newbie
AdamWu  Offline
Newbie
A

Joined: May 2020
Posts: 45
Hi, I found this in the document:
"Multicore training is now possible with scripts located in the StrategyFolder given in Zorro.ini."

My strategy is in the StrategyFolder, but it seems not using more cpu resource(30-40%), which is the same with 2.25. What is the problem? My code is like this:
Code
function run(){
	if(is(INITRUN)) NumCores = -1;
	set(PARAMETERS+LOGFILE+PLOTNOW); //+PLOTNOW
	#ifdef USE_MONEY_MANAGEMENT
	set(PARAMETERS+FACTORS+LOGFILE);
	Capital = 2000;
	#endif
	if(Train){
		StartDate = 20190202;
		EndDate = 20200802;
		NumWFOCycles = 3;
        ...

Re: New Zorro version 2.30 [Re: jcl] #481291
08/23/20 09:54
08/23/20 09:54
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Multicore in the strategyfolder works for me. Have you tried it with the workhop5?

Re: New Zorro version 2.30 [Re: Petra] #481328
08/28/20 06:16
08/28/20 06:16
Joined: May 2020
Posts: 45
A
AdamWu Offline
Newbie
AdamWu  Offline
Newbie
A

Joined: May 2020
Posts: 45
I tried workshop5. CPU usage is 30-40%, no obvious improvement.

Re: New Zorro version 2.30 [Re: jcl] #481329
08/28/20 06:20
08/28/20 06:20
Joined: May 2020
Posts: 45
A
AdamWu Offline
Newbie
AdamWu  Offline
Newbie
A

Joined: May 2020
Posts: 45
@jcl, maybe you already know these bugs of "Zorro 2.31.1":
1. "System State: 2020-06-24 12:23 - 22.56" never change or update;
2. It stoped trading once. (around 3 days in total);

Re: New Zorro version 2.30 [Re: Petra] #481334
08/28/20 09:53
08/28/20 09:53
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Hi all,
Modified the following lines in the ZorroFix file:
HistoryFolder = "C:\Users\matteo.pedroni\OneDrive\Trading\Zorro\HistoryNew" // folder with the price history files
StrategyFolder = "C:\Users\matteo.pedroni\OneDrive\Trading\Zorro\Strategy"


History and Strategy folders are correctly recognized, No mult-icore training with worshop 5 or 6.

Zorro S 2.30.7

Last edited by MatPed; 08/28/20 10:38.
Re: New Zorro version 2.30 [Re: jcl] #481365
09/02/20 09:58
09/02/20 09:58
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Zorro 2.31.xx? Exist any info about actual version?

On the web pages is only info:

Zorro 2.30 new features (released August 2020)

Last edited by Grat; 09/02/20 09:58.
Re: New Zorro version 2.30 [Re: jcl] #481386
09/07/20 12:14
09/07/20 12:14
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
The current beta version is 2.31.2. Multicore now also supports the StrategyFolder. This was not completely implemented in the previous version.

Re: New Zorro version 2.30 [Re: jcl] #481402
09/08/20 17:41
09/08/20 17:41
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
I have checked the Beta and multi-core training works, thank you. Unfortunately you can only include file with an absolute address i.e "c:\..." you can not include file even in the same strategy directory.

Thank You

Re: New Zorro version 2.30 [Re: jcl] #481478
09/19/20 08:25
09/19/20 08:25
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
Congratulations to the new version, especially from multitrain everybody will benefit, speed is amazing.

Re: New Zorro version 2.30 [Re: MatPed] #481655
10/14/20 15:21
10/14/20 15:21
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Originally Posted by MatPed
I have checked the Beta and multi-core training works, thank you. Unfortunately you can only include file with an absolute address i.e "c:\..." you can not include file even in the same strategy directory.

Thank You

In v2.32.9b including file with relative file address (i.e. #include "ReR\test.c" where ReR is a subdirectoty of the StrategyFolder defined in the ZorroFix file) still does not works

Are you planning to fix it or the function is intended to work as it is?

Thank You

Re: New Zorro version 2.30 [Re: jcl] #481684
10/19/20 12:51
10/19/20 12:51
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I see in our list that implementing the StrategyFolder in the include path of the C compiler is planned.

Page 1 of 10 1 2 3 9 10

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1