Gamestudio Links
Zorro Links
Newest Posts
AssetsSP50.csv
by oldflatop. 04/19/21 10:21
Experience with Dukascopy plugin
by Hajoha. 04/19/21 09:11
OANDA-US No Balance Showing
by nullantechamber. 04/18/21 10:24
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/17/21 15:55
Script Template
by DdlV. 04/17/21 15:07
Sierra Chart Plugin
by AndrewAMD. 04/16/21 13:21
AUM Magazine
Latest Screens
Hecknex World
Scheherazade's Journey
Paradox Vector
The Space Between
Who's Online Now
9 registered members (Dooley, AndrewAMD, oldflatop, AdamWu, 3run, Hajoha, Quad, 2 invisible), 397 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
nayan, taygeezy, dadbean, VizTra, simonkrebs
18629 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: 635
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 635
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,479
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,479
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