# Price degap function wanted

Questions about MultiCharts and user contributed studies.
wilddog
Posts: 4
Joined: 09 Aug 2011

### Price degap function wanted

I see the above has been requested on other forums.

It is a function that equates the previous close to the current open of everybar in the timeframe.

Tams has created a shifted function, but it only does the previous close to open on the day. How do you get it for every bar and display only today's chart, not mirror charts?

Thanks

JoshM
Posts: 2099
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1527 times
Been thanked: 1494 times
Contact:

### Re: Price degap function wanted

wilddog wrote:How do you get it for every bar and display only today's chart, not mirror charts?

I don't know what you mean with 'mirror charts', but if you want to calculate this for every bar on your chart, you could use a simple check to see if a new day has happened, and if yes, then calculate the offset for that day.

Code: Select all

`if (Date > Date[1]) then    // calculate off-set here`

Then apply that daily correction to every bar, and recalculate it again on the new day.

In theory, that's one way to approach this problem.

TJ
Posts: 6873
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 984 times
Been thanked: 1976 times

### Re: Price degap function wanted

wilddog wrote:I see the above has been requested on other forums.

It is a function that equates the previous close to the current open of everybar in the timeframe.

Tams has created a shifted function, but it only does the previous close to open on the day. How do you get it for every bar and display only today's chart, not mirror charts?

Thanks

Do a search for "Shift-ALL". It does the bar-by-bar de-gap.
These users thanked the author TJ for the post:
JoshM

wilddog
Posts: 4
Joined: 09 Aug 2011

### Re: Price degap function wanted

Thanks for responding, when I do a search it come back with no posts.
Attachments
shift.png (75.79 KiB) Viewed 164 times