Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (rki), 426 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
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: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
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,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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.

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