NexusFi: Find Your Edge


Home Menu

 





Wick indicator/plot for Renko bars


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two RM99 with 1 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 cbritton with 1 posts (1 thanks)
    1. trending_up 8,209 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 RM99 
Austin, TX
 
Experience: Advanced
Platform: TradeStation
Trading: Futures
Posts: 838 since Mar 2011
Thanks Given: 124
Thanks Received: 705

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.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Input: HighWickColor (Green);
Input: LowWickColor (Red);
var: IntraBarPersist True_High (0);
var: IntraBarPersist True_Low (0);
var: IntraBarPersist T_High_L (0);
var: IntraBarPersist T_Low_H (0);
var: Brick_Dir (0);

// 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;

Plot1(True_High, "BarHigh",HighWickColor ,0,0);
Plot2(T_High_L , "BarLow ",HighWickColor ,0,0);
Plot3(T_Low_H , "BarHigh",LowWickColor ,0,0);
Plot4(True_Low , "BarLow ",LowWickColor ,0,0);

// RESET
If BarStatus(1) = 2 then begin
True_High = Close;
True_Low = Close;
T_High_L = Close;
T_Low_H = Close;
End;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


"A dumb man never learns. A smart man learns from his own failure and success. But a wise man learns from the failure and success of others."
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Zytrade: Devin Brady, CEO - Ask Me Anything (AMA)
Brokers
Khamenei Vetoes Uranium Transfer as Peace Odds Surge to …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
Bond Market Rout -- Worst Week Since Russias 2022 Invasi …
Treasury Notes and Bonds
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
23 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
  #3 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256



RM99 View Post
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.

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.

 
Code
    #beginCmtry
        CommentaryCL("*************************************************");
        CommentaryCL("True High: ", True_High);
        CommentaryCL("True Low: ",True_Low);
        CommentaryCL("*************************************************");
    #End;
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
Reply With Quote
Thanked by:
  #4 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557


cbritton View Post
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.

 
Code
    #beginCmtry
        CommentaryCL("*************************************************");
        CommentaryCL("True High: ", True_High);
        CommentaryCL("True Low: ",True_Low);
        CommentaryCL("*************************************************");
    #End;
I hope this helps.

Regard,
-C

This must be something TradeStation specific as I've never heard of it before I wonder if there is a MultiCharts equivalent?

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on July 27, 2011


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts