Jump to content
  • 0

Traling Stop on open market order


AlgoTrader

Question

Hi,

 

Trying to place MARKET open order with TrailingStop without luck.

Market order works but when changing Trailing_stop = True and increment to 50* or any other number I get error:

trading_ig.rest.IGException: {"errorCode":"validation.null-conditional-set-value.request»}

Trading on DEMO CFD account

Really appreciate the help :)

 

exapmle:

 

response = ig_service.create_open_position(
    currency_code='USD',
    direction='BUY',
    epic='CS.D.ETHUSD.CFD.IP',
    expiry='-',
    force_open=True,
    guaranteed_stop=False,
    level=None,
    limit_distance=None,
    limit_level=None,
    order_type='MARKET',
    quote_id=None,
    size=0.1,
    stop_distance=None,
    stop_level=None,
    trailing_stop=True,
    trailing_stop_increment=50,
)
Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • image.png

  • Posts

    • I am a relatively newbie. I have seen similar and also have seen automated closed position has a loss though the close price I have set was above the price I have bought. After about 6 months with a lot of mysterious losses though my closing price was above the opening price, I discovered this was because of the amount charged for opening/closing a position. This is right below BUY and SELL boxes on the right in very small font. This amount vary from  0.9 to 33 or more depending on the level of trading at the time you open or close. As a result, I delete all my automated BUY/SELL values before I stop trading for the day. Remember, the the software is set up to favor the IG, not the retail seller. That is why 70% or more end up in loss.  
    • oh thank you, as a complete beginner it was interesting + useful! https://www.investopedia.com/terms/p/price-change.asp can i read this site and take it as the truth?
×
×
  • Create New...
us