Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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 | chip programmers | 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