|
JC
2021-04-08 17:14:39
|
|
Hi, I'm looking for a function that is very similar to the "ExRem" in amibroker
the exrem works as follows:
ExRem (array1,array2);
the array, and could be your entry criteria, b another array or could be your exit criteria
its usefulness is that it remains as 1, when your first array is met, and then 0 when your second array is met
This is particularly useful in setting a trend regime
My "trend" is when the upper donchian is broken, and then remains as an uptrend until the lower donchian is broken
im struggling to make this a condition, such that this is my trend and i can assign an array to this
My buy signal is completely separate, but is conditional on my trend being true
hope this makes sense
if this were amibroker code
a = close>HHV(10);
b = close<LLV(10);
bullish = exrem(a,b); and would be 1 where a is met, and zero when b becomes met
my buy signal then could be
buy = cross(smaX,smaY) AND Bullish allowing me to have a buy signal but on condition of my overall trend being met
|
|