Signal Warning Example
The following script is only a demonstration example of automated trading logic and does not constitute investment advice. Please invest cautiously and pay attention to risk control.
// Note that the identifier for the signal warning needs to be replaced with the identifier corresponding to your set signal warning
ws = security("signal:65337", "", signal)
// Golden Cross / Overbought / Bullish Divergence / Buy TD / Piercing Line / Three White Soldiers / Hammer / Morning Star / Bullish Engulfing / Rising Three Methods
b = ws == 0
// Death Cross / Oversold / Bearish Divergence / Sell TD / Dark Cloud Cover / Three Black Crows / Inverted Hammer / Evening Star / Bearish Engulfing / Falling Three Methods
s = ws == 1
// Execute trading instructions
// Close long position / Sell spot
exitLong(s, price="market", amount=1)
// Close short position
exitShort(b, price="market", amount=1)
// Open long position / Buy spot
enterLong(b, price="market", amount=1)
// Open short position
enterShort(s, price="market", amount=1)
Related Explanation
Below is an example of the statement for calling signal warning data
Parameter Description
Parameter |
Description |
"signal:65337" |
Identifier for the signal warning. You can go to the signal warning list to obtain the identifier corresponding to your set record. |
"" |
Fixed value is "" |
signal |
Fixed value is signal |
Explanation of the value of parameter ws
Value |
Description |
0 |
Golden Cross / Oversold / Bullish Divergence / Buy TD / Piercing Line / Three White Soldiers / Hammer / Morning Star / Bullish Engulfing / Rising Three Methods |
1 |
Death Cross / Overbought / Bearish Divergence / Sell TD / Dark Cloud Cover / Three Black Crows / Inverted Hammer / Evening Star / Bearish Engulfing / Falling Three Methods |
Obtaining the Identifier for Signal Warning
In the setting popup for signal warning, in the operation column of the set signal warning, click the copy button to copy the identifier for that signal warning
Related Reading:
AICoin Automated Real Trading - Quick Start
AICoin Automated Real Trading - Example of Indicator Win Rate
AICoin Automated Real Trading - Example of Custom Indicator
AICoin Automated Real Trading - Handling Common Issues
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。