Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 21:11:27 +0000



[User Discussion] - Is there a way to limit on-chart price changes to the close of the bar?

View Count: 556

[2022-09-20 13:53:05]
User203781 - Posts: 55
I have become interested in the line-on-close chart, and that is all I want to see: the close, none of the intermediate price changes within the bar. Is that possible? Thanks.
[2022-09-20 14:16:40]
Sawtooth - Posts: 3993
Have a look at this thread:
Hide currently forming candle
...in particular, post #10.
[2022-09-20 16:24:40]
User203781 - Posts: 55
tomgilb, many thanks.

Okay, now I am feeling really stupid. Setting the bar to black (my background color) on =C[1] hides the entire plot except the twitching mess at the end. Doing anything with =ID1.SG1=0 has no visible effect.

What am I doing wrong?

Thanks again.
[2022-09-20 16:53:15]
Sawtooth - Posts: 3993
What am I doing wrong?
Use this formula on the Alerts tab of the first instance of the Color Bar Based On Alert Condition study: =C[1]
Then Hide the study.

Use a formula like this on the Alerts tab of the second instance of the Color Bar study:
=ID1.SG1=0
where ID1 is the hidden instance; edit as needed.
Then set the second instance's color to match your background color.
[2022-09-20 19:22:58]
User203781 - Posts: 55
Thanks. I had missed hiding the first instance.

I think it's working now. It's hard to be sure. The moment I enabled the second instance, the scale became 0 to the highest price on the chart. Everything is compressed into 3/16" at the top of the screen. Nothing I do with the scale settings changes it, and the problem remains when I remove all studies from the chart. It also survived rebooting, which wasn't much of a surprise.

There is only one difference from your instructions. On two of my charts, something else is already id1, so the first instance of the Color Bar study becomes id2. I changed the second instance to refer to id2. All three charts I have applied this to are behaving the same way, so I don't think it's a coding problem.

Any ideas? Again, greatly appreciated.
[2022-09-21 04:54:58]
Sawtooth - Posts: 3993
Hide the second instance, and unhide the first instance.
You should see all bars colored except the current bar.

This means the current bar is 0, and all previous bars are 1

The second instance wants to find the bar with the 0, by referencing the first instance using a formula like this: =ID2.SG1=0

When it is working correctly, it should look like the attached pic, before the color is set to match the background.
Now set the color of the second instance to the same as the background, and the current bar will disappear.
imageCurrent bar isolated.PNG / V - Attached On 2022-09-21 04:54:35 UTC - Size: 6.84 KB - 71 views
[2022-09-21 13:44:32]
User203781 - Posts: 55
I must be failing to understand something. Can't imagine what, as your directions seem perfectly clear. However, doing as advised in the previous post had no effect at all. At each point, and trying some variations to make sure I had not gotten something wrong, the current price movements remain visible, and setting the scale to anything but user defined compresses the chart into the top 3/16 of an inch on the screen.

Gotta say how glad I am that someone here knows what he is doing and is willing to help. There are moments when it is the only thing that keeps me with Sierra Chart, powerful as it is. Many thanks.
[2022-09-21 15:09:32]
Sawtooth - Posts: 3993
Please post a picture of your chart.
[2022-09-21 18:36:30]
Sawtooth - Posts: 3993
Since you are using Line On Close and not candlesticks, use this formula instead in the first instance:
=C[2]
[2022-09-21 20:34:41]
User203781 - Posts: 55
Sorry to take so long getting back to you. Dentist and chores out.

That did it! I have absolutely no idea why--my ignorance is the ignorance of ten--but it did.

Thank you so much. I believe you have just enabled a huge improvement in my trading.
[2022-09-21 20:43:04]
Sawtooth - Posts: 3993
That did it! I have absolutely no idea why
The reason the current bar and the previous bar must both be marked 0 is because the Line On Close uses a draw style that connects to the next bar.
So even though the current bar was marked 0 with C[1], the previous bar would still draw the line to the hidden current bar.
So the previous bar must also be marked 0, using C[2].
Date Time Of Last Edit: 2022-09-21 20:56:40
[2022-09-21 22:11:37]
User203781 - Posts: 55
That makes it much clearer for me. Thanks again.

Unfortunately, I wrote too soon. One of the charts still isn't working. Unfortunately, it is the 1-minute chart, the one I want to trade from. With the automatic scale, it gets compressed at the top of the bar. When I try to switch to a user-defined scale, SC instantly switches to my #1 chart. On the 1-minute chart, the the first instance of the Color Bar study is ID2, so the alerts are =C[2]=0 and =ID2.SG1=0.

I tried deleting the 1-minute chart, duplicating the #1 chart, and rebuilding the 1-minute. This time, it appears to have come up on the user-defined scale and is displayed correctly. However, SC won't display the scale-setting pane so I can switch to automatic. This is the image URL, captured as SC now requires.

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=69640

The following shots are of the 5-minute chart, taken a while ago. (That chart, like all except the 1-minute, is now working correctly.) They fairly represent what I expect would happen to the 1-minute chart if SC allowed me to change the scale setting.

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=69641

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=69642

I am sorry to subject you to all this, but help me Obi-Wan tomglib. You're my only hope. (Hmmm. That feels too cute, but whatever.)
imageScreen Shot 2022-09-21 at 5.33.21 PM.png / V - Attached On 2022-09-21 21:46:58 UTC - Size: 211.63 KB - 68 views
imageScreen Shot 2022-09-21 at 4.20.05 PM.png / V - Attached On 2022-09-21 21:52:21 UTC - Size: 120.27 KB - 62 views
imageScreen Shot 2022-09-21 at 4.21.39 PM.png / V - Attached On 2022-09-21 21:56:42 UTC - Size: 162.19 KB - 62 views
[2022-09-21 22:48:15]
Sawtooth - Posts: 3993
Please Direct Message me.

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

Login

Login Page - Create Account