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
0 registered members (), 18,561 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
Invalid profit limit on entry #429255
09/10/13 13:32
09/10/13 13:32
Joined: Jun 2013
Posts: 41
Ohio, USA
P
Pork Offline OP
Newbie
Pork  Offline OP
Newbie
P

Joined: Jun 2013
Posts: 41
Ohio, USA
There are times during my testing of a script where the following code :

enterLong(units,entrypt,stoppt,entrypt+(10*PIP));
gives the following results:
(EUR/USD::L) Long 1@1.4804 Entry stop
(EUR/USD::L) Entry stop 1.4804 hit at 17:30
(EUR/USD::L) Error 010: Invalid profit limit 1.4814

[458: Fri 01.02. 17:30] -12p 1/2 high low 1.48568 1.48401

The invalid profit limit of 1.4814 is NOT invalid that I can see for a long entry of 1.4804. There are other times that the trade goes thru. I have not had success in finding anything on the forum or making a change which will solve this. The only difference I see between this and a successful entry which follows:

[499: Mon 04.02. 06:45] -3p 3/2 high low 1.48213 1.48095
(EUR/USD::L) Long 1@1.4816 Entry stop
(EUR/USD::L) Entry stop 1.4816 hit at 07:00
[EUR/USD::L0000] Long 1@1.4817 Risk 15 at 06:45

[500: Mon 04.02. 07:00] -3p 3/3 high low 1.48176 1.48094

The successful entry's price of 1.4816 is contained within the high/low price of the 7:00 time period and the stop was hit at 7:00, but the Long was actually taken at 6:45? To clear this up maybe the line from 6:45 period is needed so I added it above.


The error entry's price 1.4804 is NOT contained within the 17:30 period. But if the price is not within the period, should the entry really have been made?
I'm very confused by this.
Would be grateful for any enlightened comments.
P

Re: Invalid profit limit on entry [Re: Pork] #429666
09/16/13 12:24
09/16/13 12:24
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Can you post that script? At a first glance, the profit limit also looks ok to me, so maybe there's some other reason of the error message.

Re: Invalid profit limit on entry [Re: jcl] #429669
09/16/13 13:15
09/16/13 13:15
Joined: Jun 2013
Posts: 41
Ohio, USA
P
Pork Offline OP
Newbie
Pork  Offline OP
Newbie
P

Joined: Jun 2013
Posts: 41
Ohio, USA
Hi JCL,
I've attached a zip file with the script file and the log file rather than post it as with all the printf's to try to sort this out it is quite long.
Appreciate the help. Was able to get by the errors by removing the stop value, but didn't find the reason for the error.
Thanks
P

Attached Files
62_EURUSDtest.zip (7 downloads)
Re: Invalid profit limit on entry [Re: Pork] #429671
09/16/13 14:29
09/16/13 14:29
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Thanks for the script. I can now see the reason of the problem.

You're entering trades at an entry stop and profit target that are both sometimes below the actual price. Therefore the entry stop is hit immediately, but the profit target is at the wrong side of the price, so the trade is rejected with an error message.

In the messages you don't see the actual price, but only your entry and profit targets. This had me also confused for a moment. We'll change that message so that the real price will also be displayed.

Re: Invalid profit limit on entry [Re: jcl] #429680
09/16/13 17:08
09/16/13 17:08
Joined: Jun 2013
Posts: 41
Ohio, USA
P
Pork Offline OP
Newbie
Pork  Offline OP
Newbie
P

Joined: Jun 2013
Posts: 41
Ohio, USA
Great!
I had it narrowed down that the price wasn't right. The new message will
help explain when there is an issue.
Thanks
P


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