Skipped trades only on Verbose

Posted By: marr

Skipped trades only on Verbose - 09/30/20 05:17

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();
}
}
}
Posted By: AndrewAMD

Re: Skipped trades only on Verbose - 09/30/20 09:52

Did you eliminate TimeFrame from your sample code? If so, it’s the cause.

By the way, skipping trades when it’s not the correct frame is expected behavior, so it’s not an error.
Posted By: marr

Re: Skipped trades only on Verbose - 09/30/20 14:30

I am currently using mutiple timeframe does that mean the entry functions needs to use the same timeframe as what was used for barperiod?
Posted By: AndrewAMD

Re: Skipped trades only on Verbose - 09/30/20 14:50

No, it means your enterLong() function will only be successfully executed when it is on the correct timeframe for its given algorithm.

In other words, it really is doing what you want it to do.
© 2024 lite-C Forums