2 registered members (AndrewAMD, 7th_zorro),
1,285
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Not read open trade
[Re: Grat]
#481723
10/22/20 12:03
10/22/20 12:03
|
Joined: Mar 2019
Posts: 357
danatrader
Senior Member
|
Senior Member
Joined: Mar 2019
Posts: 357
|
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.
Last edited by danatrader; 10/22/20 12:32.
|
|
|
Re: Not read open trade
[Re: Grat]
#481732
10/24/20 14:22
10/24/20 14:22
|
Joined: Mar 2019
Posts: 357
danatrader
Senior Member
|
Senior Member
Joined: Mar 2019
Posts: 357
|
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); }
Last edited by danatrader; 10/24/20 14:31.
|
|
|
|