Hello!
I was looking for my disappearing limit orders during backtest, and my problem was the default EntryTime.
In the documentation:
EntryTime
Pending order lifetime in bars. When an enter command is given, wait the given number of bars (default: 1) until the entry limit is met. If that does not happen during that time, the trade is removed and a "Missed Entry" message is printed to the log file.
However, I did not see any messages about "Missed Entry". Verbose = 3 is in my code.
I saw that the limit order opens; see the message "... @ Entry limit", but then when the price reached the entry level, the trade was not open. It disappeared magically; no messages were in the output. Then finally I found EntryTime in the documentation, but it took time because it is not obvious. I tought my tmf function is the broken one, and I was looking for solutions there.
- What is the logic behind automatic entry removing? It's a nice feature, but I think it shouldn't be the default behavior. The reason we use limit orders is exactly about waiting (for the price to reach that level).
- It would be nice if I would see a message about automatic close as documentaton suggests. Is it a bug, or am I looking for the message in a wrong place?
- Can I completely turn off EntryTime? If I change it to 0, then the order removes immediately. Now I add a realtively huge number, but it's unneccessary calculations, and later I will forget that, and it leads me unneccessary behavior, then I will start to debug this again. Is it a reasonable feature if we use EntryTime = -1, then Zorro will not close the pending trades automatically?
Thank you!