Support Board
Date/Time: Thu, 23 Jan 2025 02:27:09 +0000
Post From: How to use use IF/ELSE in a code?
[2018-10-30 21:59:29] |
Sawtooth - Posts: 4162 |
You don't need to use the IF function when the result is boolean. Try this for a Buy Entry: =AND(CROSSFROMBELOW(C,ID1.SG2),C>=C[-1],C<=C[-2]) and this for a Sell Entry: =AND(CROSSFROMABOVE(C,ID1.SG2),C<=C[-1],C>=C[-2]) Here is the documentation for this study: Trading System Based on Alert Condition Here are some alert formula examples: Study/Chart Alerts And Scanning: Alert Formula Examples |