Steve,
Different platforms have different pairs available, so having a fixed list can cause some problems.
Here is a function that I derived from code developed by 7bit. It uses the History folder file - symbols.raw - to get the exact list for individual platforms.
Use it if you want or just disregard.
int GetAvailPairs( string& AvalPairs[] ) // Derived from code from 7bit
{
int i, SymRawHandle, PairCnt;
string AddChar = StringSubstr(Symbol(),6,4 );
SymRawHandle = FileOpenHistory("symbols.raw", FILE_BIN | FILE_READ);
PairCnt = FileSize(SymRawHandle) / 1936;
ArrayResize(AvalPairs, PairCnt);
for (i = 0; i < PairCnt; i++)
{
AvalPairs[i] = StringTrimRight(StringTrimLeft(FileReadString(SymRawHandle, 12)));
AvalPairs[i] = StringConcatenate(AvalPairs[i], AddChar );
FileSeek(SymRawHandle, 1924, SEEK_CUR);
}
FileClose(SymRawHandle);
}
It is not ready yet, but I am developing a multi-pair capable tester that I can integrate with any EA to manage multipair strategies such as this. No limit on pairs. I have it working on single pair and debugging the multi-pair version. It gives an output much like StrategyTester with equity curve also. I am anxious to integrate Going Home with it to test different settings.
Regards,
KingHigh
Different platforms have different pairs available, so having a fixed list can cause some problems.
Here is a function that I derived from code developed by 7bit. It uses the History folder file - symbols.raw - to get the exact list for individual platforms.
Use it if you want or just disregard.
int GetAvailPairs( string& AvalPairs[] ) // Derived from code from 7bit
{
int i, SymRawHandle, PairCnt;
string AddChar = StringSubstr(Symbol(),6,4 );
SymRawHandle = FileOpenHistory("symbols.raw", FILE_BIN | FILE_READ);
PairCnt = FileSize(SymRawHandle) / 1936;
ArrayResize(AvalPairs, PairCnt);
for (i = 0; i < PairCnt; i++)
{
AvalPairs[i] = StringTrimRight(StringTrimLeft(FileReadString(SymRawHandle, 12)));
AvalPairs[i] = StringConcatenate(AvalPairs[i], AddChar );
FileSeek(SymRawHandle, 1924, SEEK_CUR);
}
FileClose(SymRawHandle);
}
It is not ready yet, but I am developing a multi-pair capable tester that I can integrate with any EA to manage multipair strategies such as this. No limit on pairs. I have it working on single pair and debugging the multi-pair version. It gives an output much like StrategyTester with equity curve also. I am anxious to integrate Going Home with it to test different settings.
Regards,
KingHigh