Hello folks,

So i have a system using arrays (not based on for loops). And i want to
introduce a bunch of filters into the system and i have coded the
filters by themselves.

To now interject these filters into the original system, one way i can
think of is to convert the original system to use for loops so that i
can write the markers for the original system into static variables and
use them along with the filters to get the signals.

But is there any way i can do that without converting the original
system to use for loops.

i think i can make it work if i can somehow create an array that has say
1's everywhere where the original system was in a long trade; and say
use 2's to mark for short trades. Then i can easily AND this part with
the new filters to get the final signals.

Example:

Original System: simple MA system
Buy = Cross(EMA(15), EMA(50));
Sell = BarsSince(Buy) == 3000; // holding for a few days


New filter: dont hold overnight
Buy = TimeNum() == 093459;
Sell = TimeNum() == 160459;




Thanks
-gariki




Reply via email to