Support Board
Date/Time: Tue, 26 Nov 2024 21:39:35 +0000
Calculating the Range of High/Low based on Time period - BUT Bodies Only
View Count: 523
[2023-10-24 18:26:42] |
raheemrazzak - Posts: 41 |
Is there a way to use the H/L for Time period Study (Or any other Study) To calculate the H/L based on Time period just for bodies. H can be O or C of the Candle based on what is Higher, and same thing for L, it can be O or C based on what is lower. Thank You
|
[2023-10-24 19:58:24] |
User61168 - Posts: 403 |
try this... 1) two EMA(1) studies... one using open price and another using closing price. 2) Feed these two EMAs into two High/Low of Time Period studies via "Based on" inputs. Hide the two EMAs |
[2023-10-24 22:39:14] |
Sawtooth - Posts: 4120 |
Try this: Add the Spreadsheet Formula (Bar) study, and use these formulas: Open Formula: =MAX(O,C) High Formula: =MAX(O,C) Low Formula: =MIN(O,C) Close Formula:=MIN(O,C) Hide this study. In the High/Low for Time Period study, set its 'Based On' to the above Spreadsheet Formula (Bar) study. |
[2023-10-24 23:09:13] |
raheemrazzak - Posts: 41 |
Thanks @Sawtooth, that worked, appreciate your help!! Thank You User61168.. |
[2023-10-25 01:42:15] |
User61168 - Posts: 403 |
Great idea Tom. Never used the formula bar study so I learnt something new today! Could this technique be used to capture high and low of net equity (realized+floating profit/loss)Across the daily (single bar) RTH session? I question whether values would remain “persistent” if I apply changes to the study collection. I have been in search of a solution to capture true daily equity peak and equity low. whichever way I have tried gets wipe clean upon chart or fills reload or changes to studies.same problem with per trade MAE and MFE calculations. |
[2023-10-25 02:01:52] |
Sawtooth - Posts: 4120 |
The Spreadsheet Formula (Bar) study is meant to create OHLC bars from formulas. It might work on a 'daily bar', but you'd have to do it on its own chart. |
[2023-10-25 03:45:13] |
User61168 - Posts: 403 |
I will try it out. I use chart type of Price Changes per bar to simulate a intraday RTH session candle so this technique might work but only it OHLC values maintain persistence. What I mean by this is to run my strategy in replay model using whatever chart type I normally use, generate all the order fills in a sim account. Then I switch the chart type to Price changes per bar to generate a daily candle and then display daily peak/valley equity values. Final step would be to export into Excel to get "true" equity peaks/valleys and ignore the two columns generated in trade activity log. Edit: Thinking further and if this solution works, I could create a continuous barchart of account equity from a start date with daily OHLC along with daily MAE/MFE/maxdd/maxrunup etc values and access those directly in the strategy to generate a smoother equity curve :-) unfortunately, this means I would need a second chart and do the funky business of chart overlays. Anyways, thanks for the tip ! Date Time Of Last Edit: 2023-10-25 03:51:38
|
To post a message in this thread, you need to log in with your Sierra Chart account: