Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 04:27:27 +0000



Post From: Study/Price Overlay Study, calculate at bar close only.

[2024-04-05 13:37:41]
Sawtooth - Posts: 4120
The displacement option of the overlayed subgraph changes only the draw, not the underlying data
I think my idea would only work on time based charts, and where the source chart was a higher time frame.

For example, the source chart is 5 min, and the destination chart is 1 min:
- Set the source chart study's displacement to -1
- Add the Spreadsheet Formula study to the destination chart, and use a formula like this in its Formula field:
=IF(ID4.SG1>0,ID4.SG1,IF(AND(ID4.SG1[-1]>0,ID4.SG1=0),ID4.SG1[-1],ID5.SG1[-1]))
where ID4 is the Study/Price Overlay study on the destination chart, and ID5 is this Spreadsheet Formula study.

This makes the displayed displaced line persistent until the close of the current 5 min bar.
And it's its previous value on the 5 min chart, until the 5 min bar closes.
Then reference the Spreadsheet Formula study instead of the Study/Price Overlay study.