Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 02:10:19 +0000



[Programming Help] - Spreadsheet AutoTrader - RSI Based - Formulas Question - Help

View Count: 980

[2019-10-03 15:54:55]
maddy91 - Posts: 11
I want the following four scenarios to work.
1. When RSI Crosses 70, generate a Buy Signal and use with the Attached Order. Used the following formula in Spreadsheet
Buy Entry =AND(ABS($J$8)=0,CROSSFROMBELOW(AE3,AF3)) where AE is RSI Current Value and AF is Top Band(70)
Sell Exit(Buy)
Buy Entry =AND(ABS($J$8)<>0,CROSSFROMBELOW(AE3,AF3)) where AE is RSI Current Value and AF is Top Band(70)
and J8 is position Quantity

2. When RSI Crosses 30, generate a Sell Signal and use with the Attached Order. Used the following formula in Spreadsheet
Sell Entry =AND(ABS($J$8)=0,CROSSFROMBELOW(AE3,AG3)) where AE is RSI Current Value and AG is Lower Band(30)
Sell Exit(Buy)
Buy Entry =AND(ABS($J$8)<>0,CROSSFROMBELOW(AE3,AG3)) where AE is RSI Current Value and AG is Lower Band(70)
and J8 is position Quantity


What am i doing wrong,? when i use the same crossover formulas in alert for studies they work. I am not getting any buy sell orders alerts using this system.
[2019-10-03 18:22:06]
Sawtooth - Posts: 3982
The syntax is different for spreadsheet formulas:
=CROSSFROMBELOW(AE3:AE4,AF3:AF4)
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#CROSSFROMABOVE_Function

Also, it is best to use this method when referencing study output values:
Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account