Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Ayumi, Quad, PeWi), 488 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Pending Trade, Stop Limit by TradeEntryLimit not working #476365
02/21/19 05:32
02/21/19 05:32
Joined: Oct 2018
Posts: 79
S
SnoopySniff Offline OP
Junior Member
SnoopySniff  Offline OP
Junior Member
S

Joined: Oct 2018
Posts: 79
Hi there,

I have pending long limit and short limit trades.

When I try to adjust the entry through the TradeEntryLimit it's working for the long limit trades but not for the short limit trades.

After adjusted the TradeEntryLimit for the pending short limit trades they are executed instantly instead of just having updated the entry limit. For the long limit trades it's working fine. They are not executed but are having an updated entry limit.

Any idea?

Here some code:

for(open_trades) {
if(TradeIsPending) {

if(TradeIsLong) {
TradeEntryLimit = -5*PIP; // result: entry limit updated
}
if(TradeIsShort) {
TradeEntryLimit = -5*PIP; // result: instant execution at market price
}

}
}

Last edited by SnoopySniff; 02/21/19 14:42.
Re: Phantom Trade, Stop Limit by TradeEntryLimit not working [Re: SnoopySniff] #476366
02/21/19 06:23
02/21/19 06:23
Joined: Oct 2018
Posts: 79
S
SnoopySniff Offline OP
Junior Member
SnoopySniff  Offline OP
Junior Member
S

Joined: Oct 2018
Posts: 79
I found a workaround.

Re: Phantom Trade, Stop Limit by TradeEntryLimit not working [Re: SnoopySniff] #476367
02/21/19 08:12
02/21/19 08:12
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Hopefully by setting the limits to a correct price. wink

Re: Phantom Trade, Stop Limit by TradeEntryLimit not working [Re: jcl] #476369
02/21/19 11:03
02/21/19 11:03
Joined: Oct 2018
Posts: 79
S
SnoopySniff Offline OP
Junior Member
SnoopySniff  Offline OP
Junior Member
S

Joined: Oct 2018
Posts: 79
With using a negativ distance was not working but I translated it into a proper price entry and that's working. laugh

TradeEntryLimit = priceClose()+(-1*MyDistance);

Last edited by SnoopySniff; 02/21/19 11:11.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1