Bar Magnifier Issue

Questions about MultiCharts and user contributed studies.
ascales
Posts: 36
Joined: 06 Jan 2017
Has thanked: 4 times
Been thanked: 2 times

Bar Magnifier Issue

Postby ascales » 15 Jul 2020

Hi there,

Running the following code on daily bars with bar magnification (1 minute, 5 minute, tick etc) switched on gives incredible results.


Code: Select all

If MarketPosition = 0 then begin Buy("EntryLimit-L") 100 shares next bar at C limit; end; If MarketPosition = 1 then begin If Time >= 2300 then Sell("ExitMark-L") next bar at market; end;


Obviously the code does nothing except buy the market on a limit and exit on close. Turn off bar magnification and you see the real results. Am I missing something? Is bar magnification not compatible with daily bars or it's a code issue?

Thanks for any feedback.

A

User avatar
Vlada MultiCharts
Posts: 293
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: Bar Magnifier Issue

Postby Vlada MultiCharts » 11 Aug 2020

Hello ascales,

We believe there is nothing wrong with the code.
Backtesting results may differ from live trading since in backtesting the orders are executed immediately and in live trading, they can be stored in a queue at the broker. Also, processing orders can take some time unlike in backtesting. If you use classic backtesting mode, the orders are executed according to the prices of the main data series while in live trading the real Ask/Bid prices are used.

We can recommend you use the extended backtesting mode and configure the strategy properties closer to real trading (commissions, backtesting properties etc.) to get more real results. We can also suggest you test your strategy on the demo broker account/prebuilt Paper Trader.


Return to “MultiCharts”