I'm confused with above/bolow methods... If I want to write simple logic - if %K crossing 20% from below up, e.g. when %K is above 20% line (or %K = 21%) then put marker and/or alert... what method should I use CrossAbove() or CrossBelow() in this case? How to stop alerts and markers when %K is more 21, e.g. %K>=22 ? Same when the %K crossing 80% from above down, e.g. when below 80% or %K= 79 then put marker/alert... Stop when %K <= 78...
Here's what I'm actually writing and getting no signals/alerts...
If (K[0] > 80)
{
If CrossBelow(K, 80, 1) //If above 80 and crossing down, e.g. below 80% line...
{
// Then marker/alert short
}
}
Else If (K[0] < 20)
{
If CrossAbove(K, 20, 1) //If below 20 and crossing up, e.g. above 20% line...
{
// Then marker/alert long
}
}
....
Is there any other way to write this simple logic?
Thank you very much.
Comment