Calculated OpenPrice

 

Hello all, I have read the "Requirements and Limitations in Making Trades" and it appears that all order types MUST be based on Ask / Bid prices to be valid!!!

If my understanding is correct, this means that one cannot use an independently calculated Open Price, Close Price, for example, which may or may not be within the Ask and Bid price range?

Is this correct or am I missing something?

I greatly appreciate your input.

 
Ahmad Askari:

Hello all, I have read the "Requirements and Limitations in Making Trades" and it appears that all order types MUST be based on Ask / Bid prices to be valid!!!

If my understanding is correct, this means that one cannot use an independently calculated Open Price, Close Price, for example, which may or may not be within the Ask and Bid price range?

Is this correct or am I missing something?

I greatly appreciate your input.

Market orders have to execute on Ask and Bid price(for Buy and Sell orders).

But you can have stop and limit orders which do not need to be on Ask or Bid price. 

 
Yashar Seyyedin #:

Market orders have to execute on Ask and Bid price(for Buy and Sell orders).

But you can have stop and limit orders which do not need to be on Ask or Bid price.

Very helpful... Thank you so much Yashar...

 
  1. You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
              Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial

    On some ECN type brokers, the value might be zero (the broker doesn't know). Use a minimum of two (2) PIPs.

    The checks a trading robot must pass before publication in the Market - MQL5 Articles (2016)

  2. There is no need to create pending orders in code.

    1. The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)

      Don't worry about it unless you're scalping M1 or trading news.

    2. Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.

Reason: