Support Board
Date/Time: Wed, 25 Feb 2026 07:55:52 +0000
formula
View Count: 27
| [2026-02-24 14:19:38] |
| User220939 - Posts: 65 |
|
Hi, I coded a formula that divides the number below the bar by the number at the top of the bar. I want the top number to be negative and the bottom number to be positive. it works but it also calculates the operation for me when the 2 digits are positive and I can't prevent that. formula: =IF(ID3.SG38>=-10*ID3.SG37,ID3.SG38/-ID3.SG37,0) |
| |
| [2026-02-24 16:35:25] |
| John - SC Support - Posts: 44784 |
|
We think you are stating that you only want the calculation to take place if the top number is negative and the bottom number is positive, and you are wondering how to do this. If this is the case, then you need to use the "AND()" function to add additional tests in your IF() statement. We think the following is what you are looking for, but we are not certain that we have your top and bottom correct, so you need to verify it: =IF(AND(ID3.SG38>=-10*ID3.SG37, ID3.SG38 > 0, ID3.SG37 < 0),ID3.SG38/-ID3.SG37,0) Refer to the following: Study/Chart Alerts And Scanning: OR and AND Functions For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
| [2026-02-24 16:44:25] |
| User220939 - Posts: 65 |
|
it works, I tried with "if" and "and", but I didn't put the "and" function in the right place thanks |
To post a message in this thread, you need to log in with your Sierra Chart account:
