Remove date from test

 
I am testing a CHF based strategy but the CHF peg in early 2015 is causing irrational results so I was wondering if it is possible to code something that will prevent the strategy from trading on this date?
 
if (TimeCurrent()>=StrToTime("2015.01.15 00:00") && TimeCurrent()<=StrToTime("2015.01.15 23:59")) return;
 
Tecuciztecatl:

Thank you, I will give that I try. Just need to find a place for it in my code now.
 
...in the first line of the function OnTick or OnTimer (or wherever you have a main loop EA)
 
Tecuciztecatl:
...in the first line of the function OnTick or OnTimer (or wherever you have a main loop EA)
void OnEveryTick1()
{
    if (true == false && false) PipValue = 10;
    if (true && (NDigits == 3 || NDigits == 5)) PipValue = 10;
    if (TimeCurrent()>=StrToTime("2015.01.15 00:00") && TimeCurrent()<=StrToTime("2015.01.15 23:59")) return;
    { 
    FilterBuy();
    FilterSell();
    }
}
This worked perfectly, thank you!
 
gangsta1:
This worked perfectly, thank you!

Except

if (true == false)

will never be true

 
gangsta1: I am testing a CHF based strategy but the CHF peg in early 2015 is causing irrational results so I was wondering if it is possible to code something that will prevent the strategy from trading on this date?
Instead of kludging your EA, just remove the day from your history. Done.