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
2 registered members (AndrewAMD, TipmyPip), 12,672 guests, and 5 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
TakeProfit invalid value on large distance #482564
02/26/21 09:43
02/26/21 09:43
Joined: Apr 2019
Posts: 48
Albay
M
marr Offline OP
Newbie
marr  Offline OP
Newbie
M

Joined: Apr 2019
Posts: 48
Albay
I have a formula where I set TakeProfit to 200% of entry price

```
TakeProfit = priceClose() * ((target/100.0)+1.0); // 200% target
enterLong();
```
when i run this live i get this error `Error 010: Invalid TVKBUSD TakeProfit: -213016833

while if i print the value of the formula it returns the right number

how do i resove this issue?

Re: TakeProfit invalid value on large distance [Re: marr] #482567
02/26/21 14:38
02/26/21 14:38
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
I do not understand: if your entry price is 1.5 do you want to exit when price is 3.0? If that is the case just compare the price, do not use the TakeProfit

Re: TakeProfit invalid value on large distance [Re: marr] #482571
02/27/21 17:35
02/27/21 17:35
Joined: Apr 2019
Posts: 48
Albay
M
marr Offline OP
Newbie
marr  Offline OP
Newbie
M

Joined: Apr 2019
Posts: 48
Albay
I just don't understand why TakeProfit did not work as described on documentation

Re: TakeProfit invalid value on large distance [Re: marr] #482577
03/01/21 16:08
03/01/21 16:08
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Zorro issues an error message when stop loss or TP exceed twice the current price. It assumed that this was a programming error. Maybe that was a bit too protective. We'll make that less restrictive in future versions.


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1