Strategy shows a loss when it is not

Posted By: TalonTrades

Strategy shows a loss when it is not - 07/16/21 18:26

Why does my short, which closes below the entry price based on the TakeProfit parameter, show as a loss?

I was writing an actual strategy based on 1 minute bars and wins were showing up as losses, so I made this dummy strategy for troubleshooting purposes.

I confirmed it is definitely closing the trade based on the TakeProfit parameter but not sure why it is a loss when I enter with enterShort() .

Another sanity check was switching the entry to enterLong(), in which case it accurately shows a loss 40 ticks below my entry.

Attached picture enter-short.png
Posted By: AndrewAMD

Re: Strategy shows a loss when it is not - 07/16/21 19:31

There can be many reasons for this.

Set Verbose to 7 | DIAG and read your log files in your Log folder. (You set LOGFILE, which is good.)

Also, verify that you configured your asset list correctly.

See also:
https://zorro-project.com/manual/en/trouble.htm
Posted By: TalonTrades

Re: Strategy shows a loss when it is not - 07/16/21 20:22

It was my assets config.

The one I was testing was @ES#, which is the E-Mini S&P Futures contract. I copied the settings from the IB example. The PipCost was set to .025 and should have been 12.5. Makes sense.

Thanks Andrew!
© 2024 lite-C Forums