Understanding market order with fxcmpy

Hi everyone,

I would like to test my strategie on indices. So I am dealing with pips.
Imagine I open a market order like this :slight_smile:

order = con.create_market_buy_order(symbol, 1)

I look to place a TP at 5 pips from the buying zone is this command right ?

tradeId = con.get_open_trade_ids()[-1]
con.change_trade_stop_limit(tradeId,
is_in_pips=True,
is_stop=False,
rate=5.,
trailing_step=2)

Then for short position something like this

order = con.create_market_sell_order(symbol, 1)
tradeId = con.get_open_trade_ids()[-1]
con.change_trade_stop_limit(tradeId,
is_in_pips=True,
is_stop=False,
rate=5,
trailing_step=2)

Is this right ?
Then how make a StopLoss? Like this?

order = con.create_market_sell_order(symbol, 1)
tradeId = con.get_open_trade_ids()[-1]
con.change_trade_stop_limit(tradeId,
is_in_pips=True,
is_stop=True,
rate=5,
trailing_step=2)

With my example above I never get a stop on 5 pips. It always drift to 5 pips and above. It’s that normal?