Hello,

I have tested the Alice6 script from the Blackbook. Unfortunately the determination of OldLots does not work, so the positions from the last cycle (2 months before) are not closed.

The problem seems to be that the brokercommand GET_POSITION does not give a result. This should work since Zorro version 2.35, but unfortunately does not for me.

Then wrote a short test script, it doesn't give any results either. Tested with Darwinex and Global Prime (Zorro 2.35 with MT4 bridge).

Here's the test script:

Code
function run() {
	set(PLOTNOW+BALANCE+LOGFILE);
	set(PRELOAD); //reduce load for fetching data from MT4 server
	set(NOLOCK); //speed up API access
	LookBack = 0;

	assetList("AssetsGP");	
	asset("EUR/USD");
	
	printf("\n%d", (int)brokerCommand(GET_POSITION,Asset)); //doesnt work

	exitLong("*"); //workaround for simply closing all open positions in the trading account -> doesn't work, too

	if(Live && !is(LOOKBACK)) 
		quit("Ok!");
}



As a workaround, I tried just using exitLong to close all positions, but that doesn't work either. It just doesn't do anything at all. Here my guess is that the trades from the previous sessions are not recognized as open positions.

Can anyone help me with this?

Thx,

Simon

Last edited by simonkrebs; 04/06/21 20:47.