newbie question How to Limit number of entries per day?

Questions about MultiCharts .NET and user contributed studies.
Aufidius
Posts: 8
Joined: 01 Jul 2015
Has thanked: 1 time

newbie question How to Limit number of entries per day?

Postby Aufidius » 01 Jul 2015

If I take a loss in a given day I'd like to limit my strategy and not trade again. However its not quite clear how to do that. I tried using

CalcEntriesToday(DateTime.Today) but in my backtest it didn't work.. my guess is because the Datetime Object is returning todays date and backtest is on historical dates.

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

Re: newbie question How to Limit number of entries per day?

Postby JoshM » 03 Jul 2015

CalcEntriesToday(DateTime.Today) but in my backtest it didn't work.. my guess is because the Datetime Object is returning todays date and backtest is on historical dates.
You can use

Code: Select all

Bars.Time[0].Date
to return the date of the bar that the script is currently calculated on (as opposed to today's date).


Return to “MultiCharts .NET”