RELATIVE PERFORMANCE in MT4

 

I have this RELATIVE PERFORMANCE code in AmiBroker. Please switch to MT4. Many thanks !

_SECTION_BEGIN("RELATIVE PERFORMANCE");

//RELATIVE PERFORMANCE

list = "AUDCADFXF,AUDJPYFXF,AUDNZDFXF,AUDUSDFXF"; // type in symbols

fvb = Status("firstvisiblebar");
myAverage = 0;
num = 0;

for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )
{
fc1 = Foreign( symbol, "O" );
fc2 = Foreign( symbol, "H" );
fc3 = Foreign( symbol, "L" );
fc4 = Foreign( symbol, "C" );
fc = (fc1+fc2+fc3+fc4)/4;

if( ! IsNull( fc[ 0 ] ) )
{
relPerf = 100 * ( fc - fc[ fvb ] )/ fc[ fvb ];
myAverage = myAverage + relPerf;
Plot( relPerf, symbol, colorLightOrange + ( (2*i) % 15 ), styleLine );
num++;
}
}
myIndex = myAverage/num;
Plot(myIndex,"",colorRed, styleThick ); // plots the average
_SECTION_END();
 
I have this RELATIVE PERFORMANCE code in AmiBroker. Please switch to MT4.
No slaves here. Either learn MQ4 or pay someone.
 

LOL, as WHRoeder says. This is a helpful community, but we aren't slaves.

Probably everyone here would be happy to help you if you decided to learn MQL and had got stuck on a particular part of it, but no one here will do this for you.

MQL is very beneficial: Learn it!

Chris

 
Many thanks to all. I will learn MQL.
Reason: