Hi,
I encountered another issue with asset(). The following code does not cause error messages in train mode until asset() is called (if it is commented), and a pair is selected in the listbox. When called the message "Error 030 - Check lookback, settings, asset order" appear.

#include <profile.c>

function run()
{
StartDate = 2016;
EndDate = 2017;
BarPeriod = 60; // 1 day
LookBack = 0; //
NumWFOCycles = 10;

asset("AUD/USD");

set(RULES+PARAMETERS+TESTNOW);

if(Train) Hedge = 2;

Stop = 3*ATR(5);
Trail = optimize(13,8,55);
TrailLock = 1;
TrailSlope = 50;



LookBack = 3; // only 3 bars needed
if(adviseLong(PATTERN+2,0,
priceHigh(2),priceLow(2),priceClose(2),
priceHigh(1),priceLow(1),priceClose(1),
priceHigh(1),priceLow(1),priceClose(1),
priceHigh(0),priceLow(0),priceClose(0)) > 40)
reverseLong(1);

if(adviseShort() > 40)
reverseShort(1);

PlotWidth = 600;
PlotHeight1 = 300;
}

Here i set LookBack to 0 at the beginning to avoid problrms with calling ATR() and then change to 3 to set the number of candels for advise algorithm as mentioned in Workshop 7. Why that cease to work because of calling asse()?
Thanks in advance