where to put SetExitOnClose in the signal code?

Questions about MultiCharts and user contributed studies.
martingale
Posts: 91
Joined: 10 Dec 2010
Has thanked: 2 times
Been thanked: 1 time

where to put SetExitOnClose in the signal code?

Postby martingale » 08 Mar 2019

viewtopic.php?t=10811
post 6), but where to put the SetExitOnClose in the signal?

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

Re: where to put SetExitOnClose in the signal code?

Postby TJ » 08 Mar 2019

viewtopic.php?t=10811
post 6), but where to put the SetExitOnClose in the signal?

Have you read the RED colored highlights in the post?

martingale
Posts: 91
Joined: 10 Dec 2010
Has thanked: 2 times
Been thanked: 1 time

Re: where to put SetExitOnClose in the signal code?

Postby martingale » 08 Mar 2019

viewtopic.php?t=10811
post 6), but where to put the SetExitOnClose in the signal?

Have you read the RED colored highlights in the post?
you mean this?

Note
When automating a strategy, you will not want to use SetExitOnClose as a way to make sure that all of your positions are closed prior to the regular session end time. To do this, you will need to generate a closing order prior to the last bar in the chart.


ie. SetExitOnClose is for backtest only, not for real trades.

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

Re: where to put SetExitOnClose in the signal code?

Postby TJ » 08 Mar 2019

viewtopic.php?t=10811
post 6), but where to put the SetExitOnClose in the signal?
Have you read the RED colored highlights in the post?
you mean this?

Note
When automating a strategy, you will not want to use SetExitOnClose as a way to make sure that all of your positions are closed prior to the regular session end time. To do this, you will need to generate a closing order prior to the last bar in the chart.

ie. SetExitOnClose is for backtest only, not for real trades.
Correct.


Return to “MultiCharts”