Hi I am testing this script on live price with IB api using 30 sec and other is 1m , 5m, 30m barperiod I observed that some trades aren't opening even if the condition are met which I expect to enter a trade right away. I printed a log but didn't see any skipped trades warning messages on default view instead only shows up when set the Verbose. The verbose looks like this

[SQQQ::L] Skipped (frame)

Any idea why is this happening? How do i resolve this to force opening the trade upon success condition?

function run()
{
set(LOGFILE);

vars Prices = series(price(0));
vars Trends = series(LowPass(Prices,500));

Stop = 4*ATR(100);

vars MMI_Raws = series(MMI(Prices,300));
vars MMI_Smooths = series(LowPass(MMI_Raws,300));

if(falling(MMI_Smooths)) {
if(valley(Trends)){
Lots = 1;
printf("GOLONG");
enterLong();
}
else if(peak(Trends)) {
Lots = 1;
printf("GOLONG");
enterShort();
}
}
}

Last edited by marr; 09/30/20 05:18.