Hi MatPet
I'm checking for the trading hours of the market insinde the asset loop with an if statement. I don't think that the code is hard to maintain. But i may have missend an issure with it. In this case i'd be happy to get informed
function run()
{
int start = 0;
int end = 0;
while(asset(loop("GER30", "SPX500")))
{
if(Asset == "GER30")
{
start = 900;
end = 1700;
}
else if(Asset == "SPX500")
{
start = 1100;
end = 1900;
}
if(ltod(CET) >= start && ltod(CET) <= end)
{
yourStrategy();
}
}
}
If there is a better way i'd also like to know
Best wishes
Veli