Support Board
Date/Time: Thu, 23 Jan 2025 18:14:47 +0000
[Programming Help] - Heikin-Ashi with Spreadsheet for Trading Studies.
View Count: 1857
[2018-12-08 18:18:45] |
User87521 - Posts: 116 |
I have modified the Heikin-Ashi study to a simple up/down with no color differences for open or close. Open/High = white and Low/Last = red. I would like to incorporate this into the Spreadsheet Study for Trading with a simple buy/sell based on the colors. I think the cell would look like this: =OR((ID1,SG1=white),(ID1,SG2=white)) for the buy. =OR((ID1,SG3=red),(ID1,SG4=red)) for the sell. I'm sure there is a simple answer to this but I cannot find the parameters to use to determine "white" or "red". Thanks |
[2018-12-08 21:00:19] |
Sawtooth - Posts: 4162 |
The formulas would be the same, regardless of the colors: Buy, cell K3: =AND(ID1.SG4@4<ID1.SG1@4,ID1.SG4@3>ID1.SG1@3) Sell, cell M3: =AND(ID1.SG4@4>ID1.SG1@4,ID1.SG4@3<ID1.SG1@3) But to avoid a missed signal at a doji, you'll need to use a variation of this in another Formula Column, e.g. in cell T3 : ... Spreadsheet Example Formulas and Usage: Formula that Matches the Coloring of Up and Down Price Bars =IF(OR(ID1.SG4@3>ID1.SG1@3,AND(ID1.SG1@3>ID1.SG4@4,ID1.SG1@3=ID1.SG4@3)),1,IF(OR(ID1.SG4@3<ID1.SG1@3,AND(ID1.SG1@3<ID1.SG4@4,ID1.SG1@3=ID1.SG4@3)),-1,T4)) ...then find the transitions: Buy, cell K3: =AND(T4=-1,T3=1) Sell, cell M3: =AND(T4=1,T3=-1) |
[2018-12-10 15:29:34] |
User87521 - Posts: 116 |
Thanks very much Tom. I will try some testing now. I thought about just using the parameters of the study itself, but I thought using the color might be easier. |
[2018-12-10 16:17:24] |
Sawtooth - Posts: 4162 |
The colors themselves are not accessible; only the conditions that create the colors.
|
To post a message in this thread, you need to log in with your Sierra Chart account: