OPEN-SOURCE SCRIPT
Updated OKRA CRYPTO

The demaCrossover variable we make here gets a true value when a buy signal occurred on the current bar. It holds false when such signal didn't happen. We get that value by evaluating several conditions with a cascaded if statement (a series of if statements). It looks like a lot, but let's walk through it.
The first if portion checks if the len2 and len3 input variables are both greater than 0. When they are, we assume that all three DEMA lines are configured to show on the chart. And so for the buy signal we look at two things:
The first if portion checks if the len2 and len3 input variables are both greater than 0. When they are, we assume that all three DEMA lines are configured to show on the chart. And so for the buy signal we look at two things:
Release Notes
Not much updateOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.