How to Randomize Months In Expert

 

Hi All,

I have a expert which i need to randomize months to trade in it...

Example of what i want is this,

if Expert trade this month of initialization, it shouldn't trade the next month, and if next month wasn't traded, it should trade this month...

 

I just want a Pause in trading months of trades in this expert..

 

It make $1000 to $400,000 in 5 month as it is a high risk expert which trades just 1 hour every day excluding friday and monday, but i noticed some some months weren't looking good for it..

 Though, i coded a news filter which is good for live trading, but in strategy tester, i think the best is to avoid some random months by trading one and leaving one in tester maybe that might make it survive all of the years in backtest...

 

I tested this with 99% tick data and  i believe awesomely in the expert, i just need it to avoid some months in tester...

 

Thanks for your help... 

 
noobshow: i just need it to avoid some months in tester...
How do you know which months to avoid in the future?
 

Nope, i'm not saying i need to avoid one specific month in the future, i just want to make expert trade one month, pause one..

Just like a rotation....

 

I'm not trying to deal with previous data or future dates..

I just want to figure out if there's a good mathematician in programming who can easily figure out that maths...

 
just code timers for certain months to trade in, then maybe randomize it yourself.
 
enum Months{January, February, March, April, May, June, July, August,
            September, October, November, December };
#define MONTH_TO_AVOID April
bool isTradeMonth = MathAbs( Month() - MONTH_TO_AVOID) % 2 != 0;
March=true, April=false, May=true
 
quanti:
just code timerblocks with multiple blocks for certain months to trade in, then maybe randomize it yourself or in intervals. I wonder what kind of concept your news filter is, could you say? Do you have to constantly update it or does it just manage activity on it's own by getting information from the web economic calendar? I'm currently making a filter myself.

My news filter works perfectly okay, it gets the news from web calendars, parse, split and avoid/trade according to my settings, but it won't work in backtest, so i'm trying to randomize some months stuff...

 

Can you explain your concept, maybe i will be able to code it...

 

I just need a cool algorithm from  someone with random memory... ;p

 
WHRoeder:
March=true, April=false, May=true

I know you're good at it :D(Random Mathematician), i will be checking your code right away..

 

Thanks,

WHRoeder.... 

 
WHRoeder:
March=true, April=false, May=true

What if the April Month defined is the initialised Month?

Will it make accurate sense?

 
You said
this month of initialization, it shouldn't trade the next month
I gave
#define MONTH_TO_AVOID April
If you want April to trade use
#define MONTH_TO_AVOID May   // Avoid month after April
#define MONTH_TO_AVOID March // or month before April
Reason: