Support Board
Date/Time: Sun, 09 Mar 2025 20:43:14 +0000
Post From: combining conditions help please
[2022-03-06 16:03:48] |
User259724 - Posts: 43 |
Hello: I am trying to combine 2 conditions for a paint bar study. The first condition is ((ID1.SG1>ID1.SG1[-1]>ID1.SG1[-2]>ID1.SG1[-3]>ID1.SG1[-4])) which is a moving average rising over 4 consecutive bars, and the bars are painted correctly. The second condition is =and((ID1.SG1-ID1.SG1[-1])>(ID1.SG1[-1]-ID1.SG1[-2]),(ID1.SG1[-1]-ID1.SG1[-2])>(ID1.SG1[-2]-ID1.SG1[-3]),(ID1.SG1[-2]-ID1.SG1[-3])>(ID1.SG1[-3]-ID1.SG1[-4])) which is the difference of value of the moving average increasing from 4 bars ago to present. It also plots correctly. I am trying to combine both conditions as follows: =and (((ID1.SG1>ID1.SG1[-1]>ID1.SG1[-2]>ID1.SG1[-3]>ID1.SG1[-4]), and ((ID1.SG1-ID1.SG1[-1])>(ID1.SG1[-1]-ID1.SG1[-2]),(ID1.SG1[-1]-ID1.SG1[-2])>(ID1.SG1[-2]-ID1.SG1[-3]),(ID1.SG1[-2]-ID1.SG1[-3])>(ID1.SG1[-3]-ID1.SG1[-4]))) This does not plot any paint bars. Can anyone please correct my mistake? I have attached 2 screenshots of the same chart to make it easier to see what I am trying to accomplish. Thanks |
![]() Attachment Deleted. ![]() |