Skip to main content

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

ParameterTypePurpose
adviceenum itemValue, representing the current advice state

Returns: enum items.

Enum ItemPurpose
advice.buyNotification to buy
advice.neutralNo clear trend direction detected
advice.sellNotification to sell

Example

if close > open then
advise(advice.buy)
elseif close < open then
advise(advice.sell)
else
advise(advice.neutral)
end