Not read open trade

Posted By: Grat

Not read open trade - 10/09/20 06:04

Hi,

in the version:

Zorro S 2.32.7b

is a stupid bug. If stop AOS with open order ( not close it ) and run again, Zorro cannot manage opened trade !!!

Attached picture Snímek obrazovky 2020-10-09 v 10.50.36.png
Posted By: jcl

Re: Not read open trade - 10/19/20 13:28

I cannot confirm a 2.32 problem with opened trades. But if you cannot find the reason, please contract Support with the script, asset list, and the .trd file. They'll check if it is a bug.
Posted By: Grat

Re: Not read open trade - 10/19/20 16:28

I now don't have demo account. I trying two times last week.

A) open order from Zorro -> MT4
B) STOP the Zorro, not close OPEN order
C) after start againg, Zorro don't know the already opened order - see the pict.
Posted By: danatrader

Re: Not read open trade - 10/22/20 11:58

2.33 partly same problem.

Too bad, lost again control of all trades.
Using .bck file also no change.

Although it claims to resume, seems like it does not always.

Using 2.33 with Zorro EA MT4 2.09

Attached picture same-here.png
Posted By: danatrader

Re: Not read open trade - 10/22/20 12:03

But, I realized, for some reason, it seems to read the *.trd file of

H1_intraday_candle.trd, but then writes an empty .trd file H1_intraday_candle_EURUSD.trd, but if I rename my H1_intraday_candle.trd to H1_intraday_candle_EURUSD.trd it does not resume anything.
The renamed file gets just overwritten with emtpiness.


So probably it is again a handling issue?

What is weird, same script did run fine old versions, same script runs modified in different VPS with basicly same overall settings, but, I realized also there, it always also writes a _EUR_USD.trd file, but it is always empty, the normal .trd file is written too and gets filled.
Also there stopping and resuming for some reason worked.

Of course, EUR/USD is the asset selected in the asset scrollbox, but inside script I define Assetlist and make assetloop over all those assets.
Although, Zorro creates the empty assetspecific .trd file selected by the scrollbox, it still also updates the one it tried to resume trades from.
Posted By: jcl

Re: Not read open trade - 10/24/20 09:47

The problem seems to be the file name of the .trd file. But we can still not reproduce it here with the current beta version. It may be some setting in the script that causes a wrong file name. Can someone post the script here, or send it to Support? The trading logic can be removed, we're only interested in the settings and asset() calls.

Posted By: danatrader

Re: Not read open trade - 10/24/20 14:22

Well I don't know if this is really telling why it writes two files.
Like I mentioned, both get updated.

Just one seems to be empty -> size really small, while the other is bigger.
Also I don't know the basic structure of the scripts of Grat.


function run()
{
//set(EXE);
brokerCommand(SET_PATCH,8);
brokerCommand(SET_WAIT,30000);
setf(PlotMode, PL_ALL+PL_FINE);
set(PLOTNOW, PRELOAD);//, LOGFILE
set(FACTORS+PARAMETERS);
NumTrainCycles = 2;
BarMode = BR_SLEEP;
BarPeriod = 1440;
BarZone = ET;
ReTrainDays = 7;
TrainMode = ASCENT;
StopFactor = 1.5;
NumCores = -1;
//StartDate = ymd(wdate(NOW) - 720);
//EndDate = 20200801;
//UnstablePeriod = 12;
LookBack = 12;
MonteCarlo = 0; // 0 saves time at the end of the simulation
EndWeek = 52155;
if(Train){
OptimalFRatio = 2.5;
Hedge = 2;
}else{
Hedge = 5;}

MaxLong = MaxShort = 3;

SaveMode = SV_SLIDERS+SV_ALGOVARS+SV_TRADES+SV_STATS+SV_BACKUP;
total_usd_exposure = slider(1, 0, 0, 1000000, "USDx1k", "Total USD exposure per long/short position")*1000;
if(is(FIRSTINITRUN))
assetList("P:\\AssetsCur3.csv");

if(is(INITRUN) and !is(TRAINMODE))
{
// set USD exposure
int slider_output = slider(1);
int count = 0;
while(slider_output == 0)
{
if(count%100 == 0)
{
printf("\n### SET UP USD EXPOSURE WITH SLIDER ###");
}
wait(100);
slider_output = slider(1);
count++;
}
}else{
int slider_output = 1;
}

// portfolio loop
while(asset(loop(Assets))){
if(assetType(Asset) != FOREX)
continue; // Currency pairs only 30 total
UpdateDays = -1;
if(is(TRADEMODE)) printf("\nActual Spread for %s is %.2f", Asset, Spread/PIP);
lots_from_usd_exposure();
while(algo(loop("Range:L","Range:S")))
{
NumComponents = NumLoops1*NumLoops2;
switch(Algo) {
case "Range:L": Range(); break;
case "Range:S": Range(); break;
}
}
}
if(Init) printf("\n%i components",NumComponents);
}
Posted By: jcl

Re: Not read open trade - 10/27/20 08:03

Thanks! We'll look into it.

- Update: The bug has been confirmed. It will be fixed in the next beta version 2.33.2.
Posted By: danatrader

Re: Not read open trade - 11/02/20 20:42

Bug seems gone, at least now just one file gets written, last resume without problems.

Thank you.
Posted By: Grat

Re: Not read open trade - 11/04/20 22:26

In version 2.33.4b again this bug
Posted By: jcl

Re: Not read open trade - 11/05/20 09:31

Can you give some details? Which .trd files are created and which settings do you have in your script?
Posted By: danatrader

Re: Not read open trade - 11/18/20 15:20

Second bug seems solved with 2.33b7 trades seem all to resume.
Posted By: jcl

Re: Not read open trade - 11/19/20 07:44

Ok, but neither of the last versions has any changes in trade resuming, so it has nothing to do with the version number. If it happens again, please contact Support with details.
Posted By: danatrader

Re: Not read open trade - 11/19/20 08:20

I did contact support, problem was, *.trd was saved including stats, and that was not supported, so they told me support of "mixed" files would be possible from beta7 on.

Following line seems was the problematic one.
SaveMode = SV_SLIDERS+SV_ALGOVARS+SV_TRADES+SV_STATS+SV_BACKUP;
Posted By: jcl

Re: Not read open trade - 11/24/20 08:36

Ah, ok. You cannot resume trades and stats in test mode. Only in trade mode.
© 2024 lite-C Forums