oprder stop limit...it's a bug?

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

oprder stop limit...it's a bug?

Postby turbofib » 23 Nov 2022

hi..i code it :


input:Stop_StopLimit_12(1);



if Stop_StopLimit_12=1 then begin

buy next bar at highd(1) stop ;

sellshort next bar at lowd(1) stop;


end;

if Stop_StopLimit_12=2 then begin

buy next bar at highd(1) stop highd(1)*1.005 limit;

sellshort next bar at lowd(1) stop lowd(1)*0.995 limit;

end;

and i see difference net profit
Attachments
ImmagineMC.png
(13.33 KiB) Not downloaded yet

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: oprder stop limit...it's a bug?

Postby Svetlana MultiCharts » 08 Dec 2022

Hi turbofib,

Once the stop price is reached, the stop-limit order becomes a limit order to buy (or sell) at the limit price or better.

You can try to increase the Limit offset, or use Stop orders.

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: oprder stop limit...it's a bug?

Postby turbofib » 08 Dec 2022

Hi turbofib,

Once the stop price is reached, the stop-limit order becomes a limit order to buy (or sell) at the limit price or better.

You can try to increase the Limit offset, or use Stop orders.
Why does using the stop limit make me change the backtest?
the differences should only be with live trading

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: oprder stop limit...it's a bug?

Postby Svetlana MultiCharts » 15 Dec 2022

Stop and Stop-Limit orders are designed to work differently in backtesting, simulating real market activity.


Return to “MultiCharts”