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