Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 13:28:41 +0000



[Programming Help] - Spreadsheets and study/price overlay

View Count: 1150

[2018-06-05 07:19:54]
aknsyu71@gmail - Posts: 49
So I have a 5min (source) chart overlayed in to a 1min (destination) chart and I'm looking at the data in a spreadsheet study.
The overlayed values in the 1min destination keep changing untill the 5min source chart bar is closed as described here: Study/Price Overlay Study: Skipped and Changing Values in Destination Chart

QUESTION: I wish the record the value of the 5min overlayed source at each row of the 1min destination. ie. take a snapshot of the 5min value each time the 1min bar closes. Can anyone help with providing the formula for this please?
[2018-06-05 15:40:00]
Sawtooth - Posts: 3976
There is no formula that can create a persistent variable of an intrabar value.

You could duplicate the 5 min chart, then change it to a 1 min chart, then overlay it on the original 1 min chart.
This might work, depending on your setup.
[2018-06-05 23:58:33]
TechTrader - Posts: 116
You could use a CHANGE in the 5m OPEN price to determine the start of the 5m overlayed bar. If overlayed 5m bar OPEN is in Column AA of the spreadsheet this formula in Column K would count each 1 min bar 1-5. Hide the Overlay study so the overlayed values are not visible.

=IF(AND(AA3<>AA4),1,IF(AND(AA3=AA4),1+K4,0))

An additional formula is required if there are two consecutive 5m OPENS at the same price. This example uses column L.
=IF(AND(K3>=1,K3<=5),K3,IF(AND(K3>5),-5+K3,0))

You can then process each individual 1m bar in the spreadsheet within the 5m overlayed bar. ie IF(L3=1 then ???) through to IF(L3=5 then ???)

This post has been edited
Date Time Of Last Edit: 2018-06-06 00:01:00

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

Login

Login Page - Create Account