Hello there,

i want to trade several symbols f.i. EUR/USD ; AUD/USD ; GER30

The problem:

Since I have three functions in my script: the bar(), where I utilize different candlestick patterns; the run() where the initialization settings are located; and also the symbol loop and the tick() function, as I need to open or close positions within a bar. Does anyone have an idea on how I could incorporate the loop into my extraordinary script?"

The Code snippet:

Code
int bar(vars Open,vars High,vars Low,vars Close)
{
       //Volume Based bars or sth. else
}

function run()
{
	
	
	Capital = 1000;
	set(PARAMETERS|LOGFILE|PLOTNOW);
	StartDate = 20120101;
	EndDate = 20230101;    //StartDate + 0100; // 1 month
	StopFactor = 0;
	

	while(asset(loop("EUR/USD","GER30","AUD/USD"))) // the asset Loop
        {
        // normally i have to put the strategy conditions into this while-loop, unfortunately it is into the tick()
        }


}

	
function tick()
{
        if(trend) enterLong();
        else enterShort();
}


thank you for your Help



Last edited by steyr; 10/17/23 08:24.