Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (dr_panther, Quad, AndrewAMD, 7th_zorro), 945 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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