Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Below is the code for an indicator which will plot the wicks for Renko bars. It does not work historically, the wicks plotted for historical bars will either be zero/non-existant, or equal to the close of the previous bar.
It does however, plot live/forward making proper wicks for any bar created from live data.
Does anyone know how to create a numeric output from the truehigh and truelow values? I'm not very good at indicators yet, so I don't even know how the code specifies to plot on the bar chart, instead of making it's own/new section at the bottom.
I'd like to reference the truehigh (wick) and truelow (wick) values in number form to possibly craft some strategies. I realize they will not work in backtest, but I could run them forward for now.
Also, in the future, if there are some slick programmers here, we could possibly use a time based chart and reference bar time values to artificially recreate the wick values for historical/backtest purposes. I know TS will not backtest using a second data series, but I'm not sure if it may be possible to backtest using global dictionary or global variable values.
// BRICK DIRECTION
If BarStatus(1) = 2 then begin
If High > Open then Brick_Dir = 1;
If Low < Open then Brick_Dir = -1;
End;
// TRACK THE BRICK HIGH AND THE BRICK LOW
If Brick_Dir = -1 then begin
If Close <= Open[1] and Close >= Open then begin T_High_L = Close; T_Low_H = Close; End;
If Close < Open then begin T_Low_H = Close; T_High_L = Open; End;
If Close > Open[1] then begin T_Low_H = Open[1]; T_High_L = Close; End;
End;
If Brick_Dir = 1 then begin
If Close >= Open[1] and Close <= Open then begin T_High_L = Close;T_Low_H = Close; End;
If Close > Open then begin T_High_L = Close; T_Low_H = Open; End;
If Close < Open[1] then begin T_High_L = Open[1]; T_Low_H = Close; End;
End;
// TRACK THE TRUE HIGH AND THE YRUE LOW
If True_High < High then True_High = High;
If True_Low > Low then True_Low = Low;
From within your indicator you can reference the true_high and true_low from bars in the past.
i.e. True_High[3] would get that value 3 bars ago. But, like you said, you can only do this for charts that have been built in real time. I use commentary a lot to manually reference historical data on a bar by bar basis. Try adding this to your indicator right before the plot. Then use the Analysis Commentary to show the values in a dialog box for a selected bar.
I hope this helps.
Regard,
-C
“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu