Skip to main content

[B2] Direct market entry

Convert the pending order into a market ticket immediately with automatic lot size calculation.


Quick steps
  • Step 1: Send any pending limit ticket (A, B1, or C).
  • Step 2: Set the time frame code (last decimal of stop-loss) to 0 to immediately convert it into a market order.

Example banner


Why send a direct market order with a pending order ticket?

By sending your market with this two step process, we calculate a more precise lot size and enter the market immediately for you. It helps you to better control your risk.


How to send direct market ticket?

Sending direct market ticket take two steps. In the first step we send any kind of pending ticket, such as [A] one bar pending order, [B1] simple pending order, [C] Fibo. pending order. At the second step, we send the TF code at the last decimal of stop-loss price to 0. This way, we can convert the pending limit ticket directly to a market ticket. The lot size will be calculated based on the distance between your close price stop-loss and current market price (Bid for buy ticket and Ask for sell ticket).


What will the stop-loss time frame being set after convert to the direct market ticket?

Time frame will remain as the the one you set before at step 1. If the time frame hasn’t been set at step 1, it will be set as the default time frame(default-time-frame=M5, adjustable parameter) stored in the EA.


tip

If the timeframe has been set properly, you will see the stop-loss set to the pseudo stop-loss price, such as 0.00003 or 9999.002.


Here we provide two direct market entry example:

Example 1

Open a buy ticket for XAUUSD directly at the current Bid price with a stop-loss at 2025.321 using the M30 time frame. Hint: M30 time frame code = 0.004

Step 1: Send a pending limit ticket with the stop-loss set at 2025.324 (2025.320 + 0.004) and any open price between the current Bid price and the stop-loss price. Step 2: Send the TF=0 time frame code by setting the stop-loss price to 0.000. The ticket will be immediately converted from pending to market.


[Example 2]

Open a market sell ticket for XAUUSD with a stop-loss at 2055.032 using the H1 time frame.

Step 1: Send a pending sell ticket with:

  1. Open price: Any price between the target stop-loss and the current ask price.
  2. Stop-loss: 2055.045 (= 2055.040 + 0.005)
    • Ceil the last decimal of stop-loss for the sell order to 2055.040.
    • Add the H1 time frame code of 0.005 to the last decimal to get 2055.045.

Step 2: Send the stop-loss of 9999.000 (9999.000 + 0.000) to convert the ticket into a direct market ticket.

  • The stop-loss needs to be the addition of an extremely far stop-loss (e.g., 9999.000) with the 0 time frame code.
  • Here, we send 9999.000 (9999.000 + 0.000).

RECAP
  1. Send any pending order (A, B1, or C will work).
  2. Convert it to a market ticket by sending the time frame code to 0.