Prevent Zorro from opening positions on initial load

Posted By: Raven478

Prevent Zorro from opening positions on initial load - 10/03/21 14:26

Greetings,

As soon as I start a strategy and it connects to MT4 bridge and loads the historic lookback data, it tries to open positions.

Is there a way to prevent this?

Kind Regards
Posted By: AndrewAMD

Re: Prevent Zorro from opening positions on initial load - 10/03/21 15:25

Many reasons exist. I’d check this:
1) Is your trading script opening positions?
2) Are there any outstanding trd files in your Data folder? If so, is Zorro trying to fill unfilled orders from a previous session?
Posted By: Raven478

Re: Prevent Zorro from opening positions on initial load - 10/03/21 15:53

1. The trading script is trying to open orders based on the historic data it is loading on initial start. Like from the previous day.
2. Data folder was cleared and only par files were copied in.

smile
Posted By: Lapsa

Re: Prevent Zorro from opening positions on initial load - 10/03/21 16:07

https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=483933#Post483933

had same issues

in fact - I think my current script also immediately opens a trade.
but only one. so I sort of can ignore it for the price of single trade fees

try adding preload flag (my current script doesn't have it, think that's the issue), remove asset() function call, make sure you got history data already prepared

while debugging the issue - set lot size below minimum so your exchange would reject your trades and you don't lose money

I don't know precise reason this happens
Posted By: AndrewAMD

Re: Prevent Zorro from opening positions on initial load - 10/03/21 16:44

1. This is the default behavior. What did you want to change it to, exactly?
Posted By: Raven478

Re: Prevent Zorro from opening positions on initial load - 10/04/21 12:14

Thank you both for the replies smile

If its default behavior I can live with it. I am using limit / pending orders so its not a big issue.
© 2024 lite-C Forums