Market orders

The most straight forward trade type. It tries to execute the trade at the latest CURRENT price.

When executing a market order you can go:

  • LONG: betting the price will rise
  • SHORT: betting the price will fall

Exemple scenario

The following trades will use the data from the below historic moment.

SPX in 2020

Going LONG

If you wanted to buy SPX around the 3116.39 handle you could’ve sent a trade like this:

{
    "license_id": 1231546,
    "symbol": "SPX",
    "action": "MRKT",
    "order_type": "BUY",
    "magic_num": 123,
    "trade_type": "SINGLE",
    "size": 10, # 10 lots or contracts
    "tp": 3385.30,
    "sl": 3075.25
}

Visually it would have given you the following: LONG SPX in 2020 around 3116$ using Pinetrader.io

Going SHORT

Similarly if you wanted to short SPX around the 3116.39 handle your trade ticket could have looked something like this:

{
    "license_id": 1231546,
    "symbol": "SPX",
    "action": "MRKT",
    "order_type": "SELL",
    "magic_num": 123,
    "trade_type": "SINGLE",
    "size": 10, # 10 lots or contracts
    "tp": 3012.42,
    "sl": 3154.76
}

Visually it would have given you the following: SHORT SPX in 2020 around 3116$ using Pinetrader.io