[portfolio trader] exit rules from backtest to realtrading script

Questions about MultiCharts and user contributed studies.
LucaF
Posts: 1
Joined: 03 Nov 2021

[portfolio trader] exit rules from backtest to realtrading script

Postby LucaF » 03 Nov 2021

Hi everybody,
I have an issue to trade correctly my script in realtime. Exit rules doesn't work as in backtest.
If I have, for example, this exitrule:

if barssinceentry=3 then exit next bar market;

When I run portfolio trader in SA mode each day, it reads actual position from Interactive Brokers, but it reads them as these positions were opened the day before and so barssinceentry will be always equal to 1.
There is a way to read position from broker with the real open date and, so, exit rule would work correctly?

Thank you very much.

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

Re: [portfolio trader] exit rules from backtest to realtrading script

Postby Svetlana MultiCharts » 10 Dec 2021

Hello,

When trading in the synchronous mode, the orders generated on historical data are not taken into account. Portfolio Trader considers that the position was opened at the moment when auto trading was started.
More information about the difference of auto trading modes is here.


Return to “MultiCharts”