0 registered members (),
1,397
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: New Zorro version 2.30
[Re: jcl]
#480853
07/19/20 09:25
07/19/20 09:25
|
Joined: Mar 2019
Posts: 357
danatrader
Senior Member
|
Senior Member
Joined: Mar 2019
Posts: 357
|
http://manual.zorro-project.com/new.htmSpearman correlation with arbritrary functions. https://zorro-project.com/manual/en/transform.htmSpearman(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]
#480856
07/19/20 13:47
07/19/20 13:47
|
Joined: Feb 2017
Posts: 1,731 Chicago
AndrewAMD
Serious User
|
Serious User
Joined: Feb 2017
Posts: 1,731
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 The "What's New" page does not clarify it is referring to correl() and not to Spearman(). 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]
#480869
07/20/20 16:17
07/20/20 16:17
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
Zorro 'peeks' by one 'tick' when entering trades by returning 2 in a tmf. This script: [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: [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]
#480884
07/22/20 00:43
07/22/20 00:43
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
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: 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: [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.
|
|
|
|