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;
// TRACK THE BRICK HIGH AND THE BRICK LOW
If Brick_Dir = -1 then begin
If Close <= Open 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 then begin T_Low_H = Open; T_High_L = Close; End;
If Brick_Dir = 1 then begin
If Close >= Open 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 then begin T_High_L = Open; T_Low_H = Close; 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 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.
“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
The following user says Thank You to cbritton for this post:
This must be something TradeStation specific as I've never heard of it before I wonder if there is a MultiCharts equivalent?
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.