Gamestudio Links
Zorro Links
Newest Posts
How to: plot a frequency spectrum in bars?
by Sempervirens. 05/12/21 02:45
Backtest accuracy
by AndrewAMD. 05/12/21 00:26
Test one asset with more bar period in one run
by AndrewAMD. 05/12/21 00:22
System with more take profit
by AndrewAMD. 05/12/21 00:20
EXANTE broker
by madpower2000. 05/11/21 17:02
No Trades when Backtesting Period is longer
by TimmiHendrix. 05/11/21 15:47
Last Candle for Testing and Train?
by jcl. 05/11/21 12:14
DataSplit for Advise
by TimmiHendrix. 05/11/21 10:40
AUM Magazine
Latest Screens
Hecknex World
Scheherazade's Journey
Paradox Vector
The Space Between
Who's Online Now
3 registered members (AndrewAMD, Sempervirens, jyd), 470 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ShadowAx, TimmiHendrix, contactmmfx, msupl7, Robert_
18644 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: 637
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

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

Chief Engineer
jcl  Offline

Chief Engineer

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