Support Board
Date/Time: Tue, 04 Nov 2025 09:14:11 +0000
[Programming Help] - Multiple of ATR as BuyExit & SellExit
View Count: 655
|   [2022-02-09 23:09:12]     |  
| GG - Posts: 20 | 
| 
                Hey, Trying to get my Buy & Sell Exit as follows: Target: Crosses middle VWAP Stop: 3*ATR The BuyExit works when set to =CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) and I add a stop limit through the attached trade window, but it won't let me add a stop without throwing codes. I've tried many different equations referencing many different columns. Some examples include: =OR(ID0.SG4@$3 <= $J$9-(ID2.SG1*3)), CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) =OR(ID0.SG4@$3-(ID2.SG1*2)), CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) =OR(J10 < (E3-(ID2.SG1*2))), CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) I've searched support threads and can't seem to find out why I still can't have a stop carried out through the spreadsheet and not the stop limit. Thanks for your time, GH  | 
        
|   [2022-02-10 03:27:54]     |  
| Sawtooth - Posts: 4285 | 
| 
                To resolve the SYNTAX errors:  - The OR function should be closed at the end of this formula. - ID2.SG1 requires @3 to designate the row. This: =OR(ID0.SG4@$3 <= $J$9-(ID2.SG1*3)), CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) should be this: =OR(ID0.SG4@$3 <= $J$9-ID2.SG1@3*3, CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4)) Notes: - Calculation precedence will do '*' before '-' so you don't need to enclose ID2.SG1@3*3 - You can simplify the formula by referencing E$3 instead of ID0.SG4@$3 : =OR(E$3 <= $J$9-ID2.SG1@3*3, CROSSFROMBELOW(E3:E4, ID5.SG1@3:ID5.SG1@4)) Date Time Of Last Edit: 2022-02-10 03:37:24  
             | 
        
To post a message in this thread, you need to log in with your Sierra Chart account:
