Exclude a specific month from trading in cBot
Created at 27 Sep 2019, 03:57
Exclude a specific month from trading in cBot
27 Sep 2019, 03:57
Hi,
how can I exclude a specific month from trading in a cBot.
Actually I want to exclude: January, May, September
I have been trying to call the month by using:
var Maggio = Server.TimeInUtc.Month.Equals("May");
and I know its wrong
I need it for BackTesting
any help please !!!
mparama
27 Sep 2019, 06:30
Found It !!!
//---------------------------------------------
var January = Server.TimeInUtc.Month.Equals(1);
var May = Server.TimeInUtc.Month.Equals(5);
var September = Server.TimeInUtc.Month.Equals(9);
//---------------------------------------------
.................................................
...............................................
if (!January && !May && !September)
{
Thanks anyway !!!!
@mparama