advise
Syntax Format
advise(advice)
Overview
The advise function generates the advice notifications based on the current and historical values. This function can be particularly useful in conditions set to show a certain advice notification, depending on the asset price action.
Parameters
| Parameter | Type | Purpose |
|---|---|---|
| advice | enum item | Value, representing the current advice state |
Returns: enum items.
| Enum Item | Purpose |
|---|---|
| advice.buy | Notification to buy |
| advice.neutral | No clear trend direction detected |
| advice.sell | Notification to sell |
Example
if close > open then
advise(advice.buy)
elseif close < open then
advise(advice.sell)
else
advise(advice.neutral)
end