displaying historical execution - "at market" vs "at inside"

Questions about MultiCharts and user contributed studies.
ravel44
Posts: 28
Joined: 05 Jul 2012
Has thanked: 7 times

displaying historical execution - "at market" vs "at inside"

Postby ravel44 » 01 Jan 2016

Hello !
I'm having an issue displaying historical executions on the long side using "at inside bid", they're well displayed on the short side using "at insideask".

When I'm using

Code: Select all

sellshort sharesamount shares next bar at insideask -.7 limit;
The short order is well displayed.

When I'm using

Code: Select all

buy sharesamount shares next bar at insidebid +.7 limit;
the buy order doesn't appear.

When I replace the previous code by

Code: Select all

buy sharesamount shares next bar at market;
the buy order appears.

Please see the 3 charts attached.
Any ideas why the buy order is not appearing with

Code: Select all

buy sharesamount shares next bar at insidebid +.7 limit;
?
Attachments
3 situations.png
(95.82 KiB) Downloaded 619 times

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

Re: displaying historical execution - "at market" vs "at ins

Postby TJ » 01 Jan 2016

Hello !
I'm having an issue displaying historical executions on the long side using "at inside bid", they're well displayed on the short side using "at insideask".

When I'm using

Code: Select all

sellshort sharesamount shares next bar at insideask -.7 limit;
The short order is well displayed.

When I'm using

Code: Select all

buy sharesamount shares next bar at insidebid +.7 limit;
the buy order doesn't appear.

When I replace the previous code by

Code: Select all

buy sharesamount shares next bar at market;
the buy order appears.

Please see the 3 charts attached.
Any ideas why the buy order is not appearing with

Code: Select all

buy sharesamount shares next bar at insidebid +.7 limit;
?
What is your intention?

Buy to go long?

or

Buy to cover?


Please add some notes on your attachment. As is, they do not make any sense to me.

ravel44
Posts: 28
Joined: 05 Jul 2012
Has thanked: 7 times

Re: displaying historical execution - "at market" vs "at ins

Postby ravel44 » 01 Jan 2016

Basically I have 2 codes:
- code #1 is going short ( 1 st chart in attached file ), everything is working and well displayed.
I'm using this code for entry:

Code: Select all

sellshort sharesamount shares next bar at insideask -.7 limit;
- code # 2 is doing the exact opposite, going long ( 2nd chart in attached file ), but signals are not appearing, this is my problem.
I'm using this line of code for entry ( please note the whole code works well live though )

Code: Select all

buy sharesamount shares next bar at insidebid +.7 limit;
Signals do appear if I replace the previous code by

Code: Select all

buy sharesamount shares next bar at market;
I'm trying to figure out why it is not showing me signals with the ""'.. insidebid..." code
Attachments
3 situations.png
(105.84 KiB) Downloaded 625 times

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: displaying historical execution - "at market" vs "at ins

Postby JoshM » 02 Jan 2016

I'm having an issue displaying historical executions on the long side using "at inside bid", they're well displayed on the short side using "at insideask".
`InsideBid` and `InsideAsk` are quote fields and cannot be referenced historically. When you do use them in a trading strategy that's calculated on historical bars (as your charts show), then they'll use the current (real-time) bid and ask prices (if there are any), and so not the inside bid or inside ask of the bar that the strategy calculates on.

Precise backtesting can be used to backtest on bid/ask prices.

ravel44
Posts: 28
Joined: 05 Jul 2012
Has thanked: 7 times

Re: displaying historical execution - "at market" vs "at ins

Postby ravel44 » 02 Jan 2016

I'm having an issue displaying historical executions on the long side using "at inside bid", they're well displayed on the short side using "at insideask".
`InsideBid` and `InsideAsk` are quote fields and cannot be referenced historically. When you do use them in a trading strategy that's calculated on historical bars (as your charts show), then they'll use the current (real-time) bid and ask prices (if there are any), and so not the inside bid or inside ask of the bar that the strategy calculates on.

Precise backtesting can be used to backtest on bid/ask prices.
Thank U Josh but how comes my "short" strategy does display the short order when using "insideask" for any tickers when my "long" strategy doesn t show any long orders when using "insidebid" ?

ravel44
Posts: 28
Joined: 05 Jul 2012
Has thanked: 7 times

Re: displaying historical execution - "at market" vs "at ins

Postby ravel44 » 05 Jan 2016

Guys it obviously is a data connection problem as orders appear fine when i put the platform on in the morning, I m linked to IB, see the chart attached. I guess I'll see on their side
Attachments
Screen Shot 2016-01-05 at 6.21.58 AM.png
(29.62 KiB) Downloaded 624 times


Return to “MultiCharts”