Trailing Stop and Bar Magnifier

Questions about MultiCharts and user contributed studies.
M747
Posts: 25
Joined: 05 Feb 2016
Has thanked: 12 times
Been thanked: 2 times

Trailing Stop and Bar Magnifier

Postby M747 » 17 Mar 2016

Hello,

I have a chart with the following:
-5 minute Last bars
-5 Minute Bid bars
-5 minute Ask bars

I am using MC's "Precise Backtesting" feature so that orders are filled with Bid prices and Ask prices accordingly, rather then Last prices. I also have bar magnifier on.

When I do a Long entry with a Trailing Stop, how can I get the "Trail" to adjust itself according every time the Bid price changes within the 5 minute Bid bar? Right now I am only able to get the "Trail" to adjust itself accordingly if the Bid price at the close of the 5 minute Bid bar
is different that what the bid price was at the close of the previous 5 minute bid bar.

thanks!

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

Re: Trailing Stop and Bar Magnifier

Postby JoshM » 18 Mar 2016

When I do a Long entry with a Trailing Stop, how can I get the "Trail" to adjust itself according every time the Bid price changes within the 5 minute Bid bar? Right now I am only able to get the "Trail" to adjust itself accordingly if the Bid price at the close of the 5 minute Bid bar
is different that what the bid price was at the close of the previous 5 minute bid bar.
From my understanding the Bar Magnifier only applies to the first data series, but not for additional data series.

So whenever the script calculates to process a price inside the bar of the first data series (due to the Bar Magnifier), it cannot 'grab' an intra-bar price from the second data series. Instead, it will use the last price available from that second data series (which will be the close of the previous 5-minute bar you're talking about here).

As far as I know, the only 'workaround' for this is to lower the resolution of the additional data series. For example with a 30 second bar, you'll have 10 more bid and ask prices than with a 5 minute bar.


Return to “MultiCharts”