Pending Trade, Stop Limit by TradeEntryLimit not working

Posted By: SnoopySniff

Pending Trade, Stop Limit by TradeEntryLimit not working - 02/21/19 05:32

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
}

}
}
Posted By: SnoopySniff

Re: Phantom Trade, Stop Limit by TradeEntryLimit not working - 02/21/19 06:23

I found a workaround.
Posted By: jcl

Re: Phantom Trade, Stop Limit by TradeEntryLimit not working - 02/21/19 08:12

Hopefully by setting the limits to a correct price. wink
Posted By: SnoopySniff

Re: Phantom Trade, Stop Limit by TradeEntryLimit not working - 02/21/19 11:03

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);
© 2024 lite-C Forums