Stop behavior when autotrading  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
darob
Posts: 115
Joined: 20 Nov 2014
Has thanked: 34 times
Been thanked: 16 times

Stop behavior when autotrading

Postby darob » 22 Sep 2017

Hi

I’m running MC’s Stop_Loss, Breakeven_Stop and ATR_Trailing LX/SX in my strategies and they’re all cancelled and resubmitted on each bar close. Is this normal? I can understand why the trailing stop would do this, but the others?

Thanks

User avatar
Henry MultiСharts
Posts: 8516
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2735 times

Re: Stop behavior when autotrading

Postby Henry MultiСharts » 22 Sep 2017

Hello darob,

Which broker do you use?
Is the set of orders changing on each calculation (some added, some removed)?
Is order volume changing?
Is there a market order generated while you have price orders active at broker?

darob
Posts: 115
Joined: 20 Nov 2014
Has thanked: 34 times
Been thanked: 16 times

Re: Stop behavior when autotrading

Postby darob » 22 Sep 2017

Hi Henry

IB is the broker. Entry is MarketNextBar and the stoploss and ATR trailing stop are transmitted at that time. Breakeven stop is transmitted when the floor amount is reached and they all work as an OCO group.

I’m all in on entry (unless it’s a partial fill) and all out on exit and there’s no more entries in a security once I have a position. There’s no change aside from the ATR trailing stop price level. By order volume do you mean position size? That doesn’t change, the stops mirror the entry position size.

Thanks

User avatar
Henry MultiСharts
Posts: 8516
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2735 times

Re: Stop behavior when autotrading  [SOLVED]

Postby Henry MultiСharts » 25 Sep 2017

darob,

IB connection supports order modification. Please make sure you are not changing the set of orders from calculation to calculation. If you are using multiple data series and the orders are generated when BarStatus of Data1 =-1 you need to use AllowSendOrdersAlwaysAttribute.
These users thanked the author Henry MultiСharts for the post:
darob


Return to “MultiCharts .NET”