Kwanann
Thanks for the simplified mod to the Daily News Indicator. Just wondering if its possible to come up with a iCustom call for the Indicator?
I've attached the code that was from the original version of FFCal that seems to work well...
Thanks, Jason
Code: Select all
void NewsHandling()
{
static int PrevMinute = -1;
if (ImpactFilter > 0) {
if (Minute() != PrevMinute)
{
PrevMinute = Minute();
int minutesSincePrevEvent = iCustom(NULL, 5, "FFCal", IncludeHigh, IncludeMedium, IncludeLow, IncludeSpeaks, 1, 0);
int minutesUntilNextEvent = iCustom(NULL, 5, "FFCal", IncludeHigh, IncludeMedium, IncludeLow, IncludeSpeaks, 1, 1);
int impactOfPrevEvent = iCustom(NULL, 5, "FFCal", true, true, false, true, true, 2, 0);
int impactOfNextEvent = iCustom(NULL, 5, "FFCal", true, true, false, true, true, 2, 1);
NewsTime = false;
NewsTimeComment = "No News, Trading Allowed LVL " + impactOfPrevEvent + " " + minutesSincePrevEvent + " mins. ago, LVL " + impactOfNextEvent + " in " + minutesUntilNextEvent + " mins.";
if ((minutesUntilNextEvent <= MinsBeforeNews) ||
(minutesSincePrevEvent <= MinsAfterNews))
{
if ((impactOfPrevEvent >= ImpactFilter) || (impactOfNextEvent >= ImpactFilter)) {
NewsTime = true;
NewsTimeComment = "Ongoing News, Trading Disallowed LVL " + impactOfPrevEvent + " " + minutesSincePrevEvent + "mins. ago, LVL " + impactOfNextEvent + " in " + minutesUntilNextEvent + " mins.";
} else {
NewsTime = true;
NewsTimeComment = "Ongoing Light News, Trading Allowed LVL " + impactOfPrevEvent + " " + minutesSincePrevEvent + "mins. ago, LVL " + impactOfNextEvent + " in " + minutesUntilNextEvent + " mins.";
}
}
}
} else {
NewsTime = false;
NewsTimeComment = "Check Disabled Trading Allowed";
}
}//Void NewsHandling End