Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Strategy shows a loss when it is not #483719
07/16/21 18:26
07/16/21 18:26
Joined: Jul 2021
Posts: 8
T
TalonTrades Offline OP
Newbie
TalonTrades  Offline OP
Newbie
T

Joined: Jul 2021
Posts: 8
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 Files enter-short.png
Last edited by TalonTrades; 07/16/21 18:43.
Re: Strategy shows a loss when it is not [Re: TalonTrades] #483720
07/16/21 19:31
07/16/21 19:31
Joined: Feb 2017
Posts: 1,806
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,806
Chicago
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

Re: Strategy shows a loss when it is not [Re: TalonTrades] #483721
07/16/21 20:22
07/16/21 20:22
Joined: Jul 2021
Posts: 8
T
TalonTrades Offline OP
Newbie
TalonTrades  Offline OP
Newbie
T

Joined: Jul 2021
Posts: 8
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!

Last edited by TalonTrades; 07/16/21 20:25.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1