How stop order is calculated

Questions about MultiCharts and user contributed studies.
bailey
Posts: 16
Joined: 05 Oct 2011
Has thanked: 1 time
Been thanked: 1 time

How stop order is calculated

Postby bailey » 04 Aug 2013

Hello,

I can not explain the behavior of my stop order. The definition in the study looks like this:

Code: Select all

[IntrabarOrderGeneration = false]

BuyStop = High + 1 Point;
Buy ("Long") 3 contracts next bar at BuyStop stop;
As you can see on the image it buys now in the bar, instead of the next bar. I expected the next bar order generation because of not enabling any IOG in the settings and define it in the code also.

Does anybody have a hint for me ?
Attachments
2013-08-05 00_12_16-MultiCharts64 - EURCAD.png
(4.64 KiB) Downloaded 556 times

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: How stop order is calculated

Postby TJ » 06 Aug 2013

Hello,
I can not explain the behavior of my stop order. The definition in the study looks like this:

Code: Select all

[IntrabarOrderGeneration = false]
BuyStop = High + 1 Point;
Buy ("Long") 3 contracts next bar at BuyStop stop;
As you can see on the image it buys now in the bar, instead of the next bar. I expected the next bar order generation because of not enabling any IOG in the settings and define it in the code also.
Does anybody have a hint for me ?
Is this a back test? or a sim trade?

did you enable bar magnifier?

Your snippet does not tell the whole story. Other section of your code can affect a trade behavior.


Please see:
How Signals are Calculated
https://www.multicharts.com/trading-sof ... Calculated

bailey
Posts: 16
Joined: 05 Oct 2011
Has thanked: 1 time
Been thanked: 1 time

Re: How stop order is calculated

Postby bailey » 06 Aug 2013

Thank you TJ for you answer,
The position on the above image is okay. Stop order will be placed as best at market (if certain pricelevel accur ) on the next bar.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: How stop order is calculated

Postby Andrew MultiCharts » 08 Aug 2013

Hello Bailey,

Your script should not place orders intrabar, most likely it was generated at close of the previous bar, placed at open of current bar and filled within the current bar. I recommend you to trace order generation from your script to learn more.


Return to “MultiCharts”