Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 03:04:51 +0000



Post From: Need Help with ACSIL logic and color bar.

[2019-08-11 14:53:27]
User929084 - Posts: 60
Hi. I'm learning ACSIL and adding one thing at a time so I can understand how it works. So I modified Bid Ask Difference study from user contributed studies and added MA to it, and everything works fine up until now (DeltaDifferencewithBarColor). But now I want to add ability to color bars and add logic when to color the bars, and I don't know how to do it (DeltaDifferencewithBarColor.1). I looked at Color Bar Based On Above/Below Study and other user contributed studies, but can't seem to figure it out.

I want to get a signal when bid or ask bar closes above the MA of the study. I accomplished that with color bar based on alert condition =AND(C>O,ID1.SG1>ID2.SG1) where ID1 is Bid Ask Dif. and ID2 is the MA.

So in the ACSIL I think this is the same as above:
if (sc.BaseDataIn[SC_LAST][sc.Index] > sc.BaseDataIn[SC_OPEN][sc.Index] && sc.BaseDataIn[Up][sc.Index] > sc.BaseDataIn[Volume_MA][sc.Index]);

And I don't know how to add color bar function. Could someone please help.

I attached both files.

Thank you.
attachmentDeltaDifferencewithBarColor.cpp - Attached On 2019-08-11 14:52:39 UTC - Size: 2.86 KB - 344 views
attachmentDeltaDifferencewithBarColor.1.cpp - Attached On 2019-08-11 14:52:46 UTC - Size: 3.4 KB - 270 views