3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: New Zorro version 2.30
[Re: jcl]
#480891
07/22/20 10:03
07/22/20 10:03
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
Bug#2: The manual states: for(last_trades) 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]
#480899
07/22/20 14:09
07/22/20 14:09
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
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' . 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]
#480918
07/24/20 10:19
07/24/20 10:19
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
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,986 Frankfurt
jcl
OP
Chief Engineer
|
OP
Chief Engineer
Joined: Jul 2000
Posts: 27,986
Frankfurt
|
|
|
|
Re: New Zorro version 2.30
[Re: jcl]
#480927
07/24/20 15:32
07/24/20 15:32
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
Bug#3: results() does not work correctly: 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: [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.
|
|
|
|