- fulltilt:What part of MinsSincePrevHighNews was not understandable and what did you set it to?
it should only start trading 5 min after high impact, can anyone help?datetime AfterNews = NewsTimes[i] + MinsSincePrevHighNews*60;
bool News() : return(1);
News() returns a bool not an int. You should be using return(true).
fulltilt:
I would like to change following conditions so that it start trading instead of stop trading ...
it should only start trading 5 min after high impact, can anyone help?
bool News() { if (AvoidNews) { Check_News_Calendar(); for (int i=0; i<=NewsTotal; i++) { if (NewsRatings[i] == 3) { datetime BeforeNews = NewsTimes[i] - MinsUntilNextHighNews*60; datetime AfterNews = NewsTimes[i] + MinsSincePrevHighNews*60; datetime TradeNews = NewsTimes[i] + TradeMinsSincePrevHighNews*60; //==>new input } else if (NewsRatings[i] == 2) { BeforeNews = NewsTimes[i] - MinsUntilNextMediumNews*60; AfterNews = NewsTimes[i] + MinsSincePrevMediumNews*60; } else if (NewsRatings[i] == 1) { BeforeNews = NewsTimes[i] - MinsUntilNextLowNews*60; AfterNews = NewsTimes[i] + MinsSincePrevLowNews*60; } if ((TimeCurrent() >= BeforeNews && TimeCurrent() <= AfterNews)) //MinsSincePrevHighNews>TradeMinsSincePrevHighNews { if (High_Impact && NewsRatings[i] == 3) { if(TimeCurrent()>=TradeNews && TimeCurrent()< TradeNews + 20)//20 seconds to Open { NewsF = "Open News Trade"; return(1); } NewsF = "Avoiding to Open"; return(0); } /* if (Medium_Impact && NewsRatings[i] == 2) { NewsF = "Avoiding Medium Impact News!"; return(0); } if (Low_Impact && NewsRatings[i] == 1) { NewsF = "Avoiding Low Impact News!"; return(0); } */ } NewsF = "No News to filter!"; return(1); } } if (!AvoidNews) { NewsF = "News Filter off!"; return(1); } return(1); } // Input somewhere else if(Trades this EA < 1 && NewsF == "Open News Trade"){STARTTRADING}
TSD Newsfilter is in my opinion only good for pointing the times when news comes
Have made something similar for DailyFX calendar is updated regulary
wow looks good, would you share it?
fulltilt:
wow looks good, would you share it?
If you wanna pay... and keep it for yourself
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I would like to change following conditions so that it start trading instead of stop trading ...
it should only start trading 5 min after high impact, can anyone help?