DislikedDo my hints have any value to you Steve? I am constantly trying to improve in terms of comprehensibility and clarity.Ignored
Share trading room photos 2 replies
Share whatever you are willing to share 27 replies
MT Information (Programming, Backtesting, Tips ...) 9 replies
DislikedDo my hints have any value to you Steve? I am constantly trying to improve in terms of comprehensibility and clarity.Ignored
Since these variables are mixed types BasketUpl is double and rest of them are booleans, we can use a double array to store it. You use indexes to distinguish between them. You will also need bool2double and double2bool methods, something like:
bool double2bool(double in) {
if (in>0) return true;
return false;
}
double bool2double(bool in) {
if (in) return 1.0;
return -1.0
} DislikedIn mql4 there are no compound types (structs) so a function can really just return single value, or an array of the same types.Ignored
DislikedWe are definitely not done. I don't know about indicators that much, this thread was started to explain, how to apply general software engineering knowledge to EA programming. But maybe someone else may answer?Ignored
DislikedDid you find a way to declare an mql4 function that will return an array? I couldn't find any documentation on this and also didn't find an undocumented way so i am still forced to use by reference.Ignored
Dislikedhttp://www.molanis.com/products
I know that the above has probably <10% the diminutive power of manually coded EAs.
But what do u think holds in store for these GUI cut-copy-paste icons meant for non-programmers?Ignored
DislikedHi,
Hope someone can help me...
How can I use FFcal indicator to trigger order x minutes after the news with different SL / TP value for different impact news? Something like: for High impact news set SL/TP 50/50, Medium impact new set SL/TP 30/30, etc..
Thanks
Regards,
JidonkIgnored
bool NewsFilterCheck()
{
// Checks for impending news events.
// Deletes pending trades where necessary.
// Closes open trades in profit or at be if required.
// Returns true if news is inside the user parameters, else false
if(!IsTesting())
{
int minutesUntilNextEvent = iCustom(NULL, 0, "FFCal", true, true, false, true, true, 1, 1);
datetime dTime = minutesUntilNextEvent * 60;
string sTime = TimeToStr(dTime, TIME_MINUTES);
string sText;
if (minutesUntilNextEvent>MinsUntilNews)//No news within the chosen timescale
{
sText = StringConcatenate("No News within the next ", sTime);
bool TradeAllowed = true;
}//if (minutesUntilNextEvent>MinsUntilNews)
else
{
//News event within the chosen timescale
int impactOfNextEvent = iCustom(NULL, 0, "FFCal", true, true, false, true, true, 2, 1);
string sImpact = Num2Impact(impactOfNextEvent);
if(StringLen(sImpact)>0) sImpact = "[" + sImpact + "] ";
//sText = sImpact + "News in " + minutesUntilNextEvent + " mins.";
sText = sImpact + "News in " + sTime;
ScreenMessage = StringConcatenate(ScreenMessage, Gap, sText, NL);
//Should the robot suspend trading?
if (impactOfNextEvent >= NewsImpact)
{
TradeAllowed = false;//Suspend trading
}//if (impact >= NewsImpact)
}//else
ScreenMessage = StringConcatenate(ScreenMessage, Gap, sText, NL);
return(TradeAllowed);
}//if(!IsTesting())
}// End bool NewsFilterCheck()
string Num2Impact(int impact)
{
if (impact == 3) return ("HIGH IMPACT");
if (impact == 2) return ("MED IMPACT");
if (impact == 1) return ("LOW IMPACT");
else return ("");
}//End string Num2Impact(int impact) int minutesSincePreviousEvent = iCustom(NULL, 0, "FFCal", true, true, false, true, true, 1, 0); int impactOfPreviousEvent = iCustom(NULL, 0, "FFCal", true, true, false, true, true, 2, 0);
if (impactOfNextEvent >= NewsImpact)
{
TradeAllowed = false;//Suspend trading
}//if (impact >= NewsImpact) DislikedHi Steve,
I wonder if you could help me in an EA based on this indicator:
the indicator is created by bruce, I wrote him to see if there is any EA based on that but I didnt get any reply.
also I have a Hedging algorithm based on this indicator, I traded in paper and live (limited times) that but it needs to be automated (particularly for hedging).
I appreciate your help in advanceIgnored