mt5 strategy tester ticks - page 14

 
WhooDoo22:

Hello MQL5 community,

I've been reading 'OrderSend' MQL5 site documentation, the .pdf and .chm resources,


none provide details for 'SYMBOL_TRADE_EXECUTION_REQUEST' more than a brief 'Description' ('Execution by request'). Apparently there's four identifier types for 'ENUM_SYMBOL_TRADE_EXECUTION'.

Did you read this  (scroll down a little)  : https://www.mql5.com/en/docs/constants/structures/mqltraderequest
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure - Documentation on MQL5
 
angevoyageur:

Found on the Russian forum :

  • Immediate execution (Instant Execution) In this mode, the performance of a market order at the price offered by the broker. When sending a request for execution, the terminal will automatically fill in the order for current prices. If the broker takes the price, the order will be executed. If the broker does not receive the requested price, then there is the so-called "Perekotirovanie" (Requote) - broker returns the prices at which can be executed this order.
  • Execution on request (Request Execution)
    In this mode, the performance of a market order at the price previously received from the broker. Before sending a market order with your broker asks for the price of its execution. Upon receipt, the execution of a warrant at this price you can either confirm or deny.
  • Performance of the market (Market Execution)
    In this mode of execution of the decision of a market order execution price takes the broker without approval from the trader. Sending a market order in this manner implies an early agreement with the price at which it will be executed.
  • The Exchange version (Exchange Execution) In this mode, the trading operations performed in the terminal are output to the external trading system (the stock exchange). Trading operations are performed on the current market price offers.

Hello Alain,

Yes, I think your post contains content I was searching for, thank you kindly.


I don't think 'OrderSend''s twelfth parameter enum_order_type_filling is used in MQL4 and I have no previous experience applying it to MQL5 'OrderSend''s parameter code.

enum_order_type_filling

"an order can be filled only in the specified amount".

Is this "specified amount" an order's lotsize?


"If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed."

What is a "necessary amount of a financial instrument"?

How can necessary amounts of a financial instrument currently be unavailable in the market?


"The required volume can be filled using several offers available on the market at the moment."

What is "required volume" and how can it be filled using "several offers"?


What is enum_order_type_filling's purpose?


Thank you

 
RaptorUK:
Did you read this  (scroll down a little)  : https://www.mql5.com/en/docs/constants/structures/mqltraderequest

Hello Simon,

"Did you read this  (scroll down a little)"

I did read it but I hadn't yet read 'OrderSend''s twelfth parameter enum_order_type_filling. I took no interest in it since there wasn't a parameter to apply the content.


Yes, I think your post's link contains content I was searching for, thank you kindly.

Edited by moderator.

 
Hi Nathan, it's not necessary to repeat same questions in 2 posts ;-)
 
WhooDoo22:

"an order can be filled only in the specified amount".

Is this "specified amount" an order's lotsize?

Yes. "specified amout", "order volume", "lot size" are all the same.


"If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed."

What is a "necessary amount of a financial instrument"?

When you pass an order, buy 1 lot for example, there must be someone who wants to sell 1 lot. On Forex this is not a problem, as this market is very huge, but on some market, there is not necessarily someone to sell.


How can necessary amounts of a financial instrument currently be unavailable in the market?

See above. You can pass an order for 1 lot, and there are only 0.5 lot available on the market.


"The required volume can be filled using several offers available on the market at the moment."

What is "required volume" and how can it be filled using "several offers"?

See above. You want to buy 1 lot, there are 2 offers to sell 0.5 lot on the market.


What is enum_order_type_filling's purpose?

I hope it's clearer with above answers. This parameter is setted by the broker. You have to check that before passing an order.

Thank you

You are welcome.
 
WhooDoo22:

Hello Alain,

Yes, I think your post contains content I was searching for, thank you kindly.


I don't think 'OrderSend''s twelfth parameter enum_order_type_filling is used in MQL4 and I have no previous experience applying it to MQL5 'OrderSend''s parameter code.

I guess you haven't come across  Fill or Kill before ?
Fill Or Kill (FOK) Definition | Investopedia
Fill Or Kill (FOK) Definition | Investopedia
  • www.investopedia.com
A type of time-in-force designation used in securities trading that instructs a brokerage to execute a transaction immediately and completely or not at all. This type of order is most likely to be used by active traders and is usually for a large quantity of stock. The order must be filled in its entirety or canceled (killed). The purpose of a...
 
angevoyageur:
Hi Nathan, it's not necessary to repeat same questions in 2 posts ;-)

I realized two nearly identical posts were unnecessary after reading both posts but decided to just let it be. Next time, I'll try designating my response a fresh post.

Thank you

 
angevoyageur:
WhooDoo22:
Yes. "specified amout", "order volume", "lot size" are all the same.


When you pass an order, buy 1 lot for example, there must be someone who wants to sell 1 lot. On Forex this is not a problem, as this market is very huge, but on some market, there is not necessarily someone to sell.


See above. You can pass an order for 1 lot, and there are only 0.5 lot available on the market.


See above. You want to buy 1 lot, there are 2 offers to sell 0.5 lot on the market.


I hope it's clearer with above answers. This parameter is setted by the broker. You have to check that before passing an order.

You are welcome.
"I hope it's clearer with above answers. This parameter is setted by the broker. You have to check that before passing an order."


After you read and reply to my response, I'll let you be the judge of that :)

//ENUM_ORDER_TYPE_FILLING identifiers
ORDER_FILLING_FOK

ORDER_FILLING_FOK is a procedure performing only one of two market entry types, 1.00 buy lot matched to a 1.00 sell lot (type_1) or 1.00 buy lot matched to three sell lots sized at 0.25, 0.25 and 0.50 (type_2). If type_1 or type_2 can't be performed, the order doesn't enter the market.

//ENUM_ORDER_TYPE_FILLING identifiers
ORDER_FILLING_IOC
ORDER_FILLING_IOC is a procedure performing only one market entry type, 1.00 buy lot matched to whatever sell lot size is presently available. The matched sell lot size could be any size up to 1.00.
//ENUM_ORDER_TYPE_FILLING identifiers
ORDER_FILLING_RETURN
What is ORDER_FILLING_RETURN's procedure?

What is this (documentation) phrases meaning?, "In case of partial filling a market or limit order with remaining volume is not canceled but processed further." (poorly written, straight up)

My translation of the above phrase is, "if a market/limit order is being partially filled it isn't canceled and it's remaining volume isn't canceled but processed further.".


My impression is the procedure is performed under the following criteria (order types (three types) and symbol types (two types)):

ORDER TYPES:

type_1: ORDER_TYPE_BUY and SELL

type_2: ORDER_TYPE_BUY and SELL_LIMIT

type_3: ORDER_TYPE_BUY and SELL_STOP_LIMIT

SYMBOL TYPES:

type_1: Market execution

type_2: Exchange execution

What is the difference between them? What are they?


"For the activation of the ORDER_TYPE_BUY_STOP_LIMIT and ORDER_TYPE_SELL_STOP_LIMIT orders, a corresponding limit order ORDER_TYPE_BUY_LIMIT/ORDER_TYPE_SELL_LIMIT with the ORDER_FILLING_RETURN execution type is created."
ORDER_TYPE_BUY_STOP_LIMIT//Upon reaching the order price, a pending Buy Limit order is places at the StopLimit price

ORDER_TYPE_SELL_STOP_LIMIT//Upon reaching the order price, a pending Sell Limit order is places at the StopLimit price

I'm assuming a buy stop limit order is sent if price reaches "stop price" (the price above current market price) and once price reaches "stop price" the order becomes a buy or sell limit order (depending on code) and the order again waits for price to arrive below current price arriving at buy limit price (buy limit order) or continue to rise above current price arriving at sell limit price (sell limit order). A buy stop limit order is a stop order first then becomes a limit order second. This is correct, yes?

Stop limit orders aren't included in MQL4 and I have no prior experience coding e'm.

Thank you

 
RaptorUK:
I guess you haven't come across  Fill or Kill before ?

You guessed right :)

Thank you

 

Hello MQL5 community,

While coding in meta editor I tried using the order type function and was alerted by an error in meta editor's toolbox (see snapshot below).

order type undefined

As you should see, the order type function isn't defined yet its seemingly defined by docs (https://www.mql5.com/en/docs/standardlibrary/tradeclasses/chistoryorderinfo/chistoryorderinfoordertype).

A condition I'm attempting is

if(OrderType()==ORDER_TYPE_BUY)

How can the order type function be used in meta editor if it isn't defined?

Thank you

Reason: