Login Page - Create Account

# Support Board

Date/Time: Sat, 20 Oct 2018 14:10:33 +0000

## [User Discussion] - Need help Error #DIV/0- using Study

Support Request:
 [2017-12-02 15:38:23] #1 nicktrader - Posts: 322 I am using the Study "Color bar based on..." As soon as a new candle starts and the bid or ask volume = 0 I get the error message "#DIV/0" The first part of the formula is totally ignored. I have tried many things without any success. =OR(AND(H-L>11,O-C>8,V>V[1],BV/AV>BV[1]/AV[1]), AND (H-L>11,C-O>8,V>V[1], AV/BV>AV[1]/BV[1])) Many thanks Date Time Of Last Edit: 2017-12-02 15:39:45
 [2017-12-02 16:46:12] #2 tomgilb - Posts: 1974 Try this: =IF(OR(AV=0,BV=0), OR(AND(H-L>11,O-C>8,V>V[1]),AND(H-L>11,C-O>8,V>V[1])), OR(AND(H-L>11,O-C>8,V>V[1],BV/AV>BV[1]/AV[1]),AND(H-L>11,C-O>8,V>V[1],AV/BV>AV[1]/BV[1])))
 [2017-12-03 04:09:05] #3 nicktrader - Posts: 322 @tomgilb Many thanks for your help. Never seen before that kind of formula. I have used the formula, but unfortunately still the same error message (see pic). Although the conditions do not meet the criteria, it is already calculated and this gives the error message (from my point of view) Error.png / V - Attached On 2017-12-03 04:01:26 UTC - Size: 17.22 KB - 81 views
 [2017-12-03 06:40:26] #4 TechTrader - Posts: 101 Your AV,BV and V formulas indicate they are looking forward to bars that have not yet printed. As soon as a bar starts, the formulas are looking for the next bar where all values will be zero. If assuming you are comparing current bar with previous bar AV,BV and V values then using [-1] should achieve that.
 [2017-12-03 07:51:03] #5 nicktrader - Posts: 322 @TechTrader I know. The problem is certainly the part "AV/BV" or "BV/AV". But I can't use [1] because it would misrepresent the result.

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

Login

Login Page - Create Account