Hello -

I hijacked the code from the tutorial and created a lowpass crossover trigger. I have many questions however what I would really like is better resolution when I plot the indicators, so I can see the trigger. Can I using the results button or do I need to log the data an plot in a different package.

Thanks!

T

BTW.. Lots of promise it would seem on this crossover. 213% and it is not trading the tops which I am very happy with.

function run()
{
set(PARAMETERS+FACTORS); // generate and use optimized parameters
BarPeriod = 240; // 4 hour bars
LookBack = 500; // needed for Fisher()
NumWFOCycles = 10; // activate WFO
NumBarCycles = 4; // 4 times oversampling

var *Price = series(price());
var *Trend = series(LowPass(Price,optimize(250,100,1000)));
var *TrendShort = series(LowPass(Price,30));
var *TrendLong = series(LowPass(Price,50));
var ma = MovingAverage(Price,200,MAType_SMA);
vars Signals = series(0);

Stop = optimize(4,2,8) * ATR(100);

if(ReTrain) {
UpdateDays = 30; // reload new price data from the server every 30 days
SelectWFO = -1; // select the last cycle for re-optimization
}

// portfolio loop
while(asset(loop("EUR/USD")))
{
// set up the margin
if(OptimalFLong > 0 and OptimalFShort > 0)
{
Margin = 100*(OptimalFLong+OptimalFShort);
//Margin += (WinTotal-LossTotal)/8 * (OptimalFLong+OptimalFShort);

Trail = 2*ATR(100);
TimeExit = 4;

if (crossOver(TrendShort,TrendLong)){
if(Sum(Signals+1,3) == 0)
enterLong();
Signals[0] = 1;
}
if (crossUnder(TrendShort,TrendLong)){
if(Sum(Signals+1,3) == 0)
enterShort();
Signals[0] = 1;
}

}
}

plot("Fast", *TrendShort, NEW, RED);
plot("Slow", *TrendLong, 0, BLUE);
PlotWidth = 800;
PlotHeight1 = 600;

}