Metatrader at AMPFUTURES - SP500 / Slippage on Limited Orders

You can partially close in MT5 no issue, just use varying limits as your exits. he might mean using the native SL/TP as being unable to natively partial close, but why anyone would use those anyway is beyond me.

You will suffer disconnects with AMP MT5 over time, and it will come at the worst possible times. trust me with my near five year journey on this path - don't walk it. use a different platform.
 
You can partially close in MT5 no issue, just use varying limits as your exits. he might mean using the native SL/TP as being unable to natively partial close, but why anyone would use those anyway is beyond me.

You will suffer disconnects with AMP MT5 over time, and it will come at the worst possible times. trust me with my near five year journey on this path - don't walk it. use a different platform.
I'm familiar with your migration from MT5 to Quantower, and would have done the same in your circumstances. However, in my 1½ years of using AMP MT5, I have yet to experience any disconnects or other issues. This, together with the fact that I am sufficiently proficient in MQL5, means that I'll stay the course until further notice.
 
I'm familiar with your migration from MT5 to Quantower, and would have done the same in your circumstances. However, in my 1½ years of using AMP MT5, I have yet to experience any disconnects or other issues. This, together with the fact that I am sufficiently proficient in MQL5, means that I'll stay the course until further notice.

nice. I truly hope it stays that way. I love a lot of things about MT5! it just kept happening and I had to get away. I'm sure being able to do your own coding helps too lol.

just be careful during volatility, like extreme vol. that's when it will happen. doesn't have to necessarily be news, just big vol in general. the delays & freezes will occur. good luck.
 
Lucysparabola
How to specifie as such LIMIT ORDERS?

I think that entrey orders (buy or sell) no close orders (take profit / stop loss) are LIMIT ORDERS.

This what I see on my AMP MT5 screen from the entry window...

mt5pendingorder.JPG


Indeed. It doesn't look like you have the ability to specify the SL/TP settings as limit orders. Seems like the best choice would be once you get your fill, just set a limit order to exit without filling in the other fields.
 
Buy limit order :

m_trade.OrderOpen(Symbol(), ORDER_TYPE_BUY_LIMIT, no_contracts, 0, price, 0 , 0)

where m_trade is an object of class CTrade.

The code for SELL LIMIT bellow. He (programmer) uses Trade.mqh > trade.SellLimit

***************

bool SellLimite(double vol, double price, double stoploss, double takeprofit, string mensagem)
{
if (!CheckStopLoss_Takeprofit(ORDER_TYPE_SELL_LIMIT,targetStopLoss,targetProfit,price)){
return(false);
}

bool tradeSucess = trade.SellLimit(vol, price, _Symbol, stoploss, takeprofit, 0, 0, mensagem);
if(tradeSucess)
{
if(trade.ResultRetcode()==10008 || trade.ResultRetcode()==10009)
{
Print("EA ->", magicNumberEA, "Order entry partial Sell Sucess");
}
else
{
Print("EA ->", magicNumberEA, "Servidor return, Return -> ", trade.ResultRetcode());
ResetLastError();
return(false);
}
}
else
{
Print("EA ->", magicNumberEA, "Order Partial Entry Sell Fail, Error -> ", GetLastError());
ResetLastError();
return(false);
}
return(true);
}
 
nice. I truly hope it stays that way. I love a lot of things about MT5! it just kept happening and I had to get away. I'm sure being able to do your own coding helps too lol.

just be careful during volatility, like extreme vol. that's when it will happen. doesn't have to necessarily be news, just big vol in general. the delays & freezes will occur. good luck.

Lucysparabola

Are you comfortable with Quantower?
 
The code for SELL LIMIT bellow. He (programmer) uses Trade.mqh > trade.SellLimit

***************

bool SellLimite(double vol, double price, double stoploss, double takeprofit, string mensagem)
{
if (!CheckStopLoss_Takeprofit(ORDER_TYPE_SELL_LIMIT,targetStopLoss,targetProfit,price)){
return(false);
}
bool tradeSucess = trade.SellLimit(vol, price, _Symbol, stoploss, takeprofit, 0, 0, mensagem);
...
...
}
Tell your programmer to use the OrderOpen method rather than the BuyLimit or SellLimit methods. More importantly, specifying a TP value will result in a market (rather than limit) order being placed when TP is reached, no matter which method is used. To overcome this, use an OpenOrder with 0 TP value and when the position is opened, issue the corresponding closing limit order (TP) using OpenOrder.
 
Tell your programmer to use the OrderOpen method rather than the BuyLimit or SellLimit methods. More importantly, specifying a TP value will result in a market (rather than limit) order being placed when TP is reached, no matter which method is used. To overcome this, use an OpenOrder with 0 TP value and when the position is opened, issue the corresponding closing limit order (TP) using OpenOrder.

I also think futures being netting vs hedging forces you to use separate orders. If you're workibg with forex devs just make sure you specify that.
 
MT5 Take Profit order = Market if touched order
https://faq.ampfutures.com/en_us/metatrader-mt5-order-types-order-execution-logic-BkrMK0BFq

Explanation on MetaTrader 5 Advanced Order Execution Logic:

For Exchange Contracts, Stop Loss and Take Profit orders are triggered according to the rules of the exchange where trading is performed. Usually, this will be by Last price (price of the last performed transaction). In other words, a TP/SL order triggers when the Last price touches the specified TP/SL price.

However buying or selling as a result of the activation of a stop-order is always performed by the Bid and Ask prices during the activation of the Stop order, which may differ from the Price specified by the trader.


What does this mean for a trader? If you are working a Bracket Order <stop loss & take profit> order, the take profit order is an MIT (Market Order if Touched) just like the Stop Loss order. Depending on the market conditions, since it is triggering a market order, there will be a difference between the final fill price and the take profit order price. At least 1 tick “slippage” due to the market order fill price of the next available Bid/Offer price.

Key Clarification >> If you work a Straight Limit Order (not connected to a Bracket Order or if you are using an automated trading strategy that uses straight limit orders) the order will work as a standard limit order (filling at your price or better).
 
Back
Top