NexusFi: Find Your Edge


Home Menu

 





Has anyone successfully created a renko bar within powerlanguage code?


Discussion in MultiCharts

Updated
    1. trending_up 2,247 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Has anyone successfully created a renko bar within powerlanguage code?

  #1 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 66 since May 2019
Thanks Given: 7
Thanks Received: 9

I've had many people suggest that I create my Renko bar within my indicator/strategy. Be honest, I'm not sure I'd know where to start.

I like the idea of the bars created within my code so I can test for optimal renko bar size, but again, I really don't know what to do...

So.... does anyone have suggestions or even better... code for renko bars? Mind you, I'm not looking for strategies, just the creation of renko bars within code (I assume based off of a tick chart).

Please let me know, I'm desperate.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
65 thanks
Funded Trader platforms
42 thanks
Battlestations: Show us your trading desks!
25 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
The Program
19 thanks
  #2 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 66 since May 2019
Thanks Given: 7
Thanks Received: 9

OK, so after talking to a paid programmer and multicharts...

they said at this time it is not possible to build a renko bar within PL to display per se...

but it is possible to create a renko bar within code for the purpose of a strat. This is a consolation, and I can still work with this...

SO.... my question still stands...

Has anyone successfully constructed a flex renko bar within strategy code that can be used in conjunction with signal code? I am not looking for a working signal. Just looking for code that creates renko bar data within the strategy. My desire is to have INPUTs for the BOX SIZE, TREND OFFSET AND REVERSAL OFFSET, so I can run optimization tests to help determine optimal renko settings for my signal.

Thanks

Started this thread Reply With Quote
  #3 (permalink)
 elitecamper 
McAllen, TX
 
Experience: Advanced
Platform: Multicharts, Jigsaw
Broker: Ironbeam
Trading: ES, ZN, ZB, ZF
Posts: 104 since May 2013
Thanks Given: 108
Thanks Received: 133


Hello, I have seen a renko indicator superimposed on time candle sticks. I remember playing around with it and tweaking it and I eventually lost it because I wiped my hard drive and reformatted my PC.


The way I found it was by searching for "easylanguage renko". Here it is I was able to find it again. Its from the
TradersLaboratory Forum.

 
Code
{Renko-Adaptive indicator (based on ATR)

Written by konkop 07.03.2002.

*********************

Attention: set MaxBarsBack (f.e. =30) in this study according with

MaxBarsBack value in the Renko_Adaptive strategy

for correct step-by-step calculations of the buy/sell levels

*********************}

 

Inputs: K(1),

Smooth(10);

 

vars:Brick(0) ,DN(0), UP(0), BricksUp(0), BricksDn(0);

 

Value1 = AvgTrueRange(Smooth);

 

If BarNumber = 1 Then Begin

Up = H;

Dn = L;

Brick = K*(H - L);

End;

If BarNumber > 1 then begin

If C > UP + Brick Then begin

BricksUp = IFF(Brick = 0, 0, Floor((C - Up)/Brick)*Brick);

UP = Up + BricksUp;

Brick = K*Value1;

DN = Up - Brick;

BricksDn = 0;

End;

If C < Dn - Brick Then begin

BricksDn = IFF(Brick = 0, 0, Floor((Dn - C)/Brick)*Brick);

Dn = Dn - BricksDn;

Brick = K*Value1;

Up = Dn + Brick;

BricksUp = 0;

End;

End;

 

Plot1(UP, "Up");

Plot2(DN, "Dn");

Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 elitecamper 
McAllen, TX
 
Experience: Advanced
Platform: Multicharts, Jigsaw
Broker: Ironbeam
Trading: ES, ZN, ZB, ZF
Posts: 104 since May 2013
Thanks Given: 108
Thanks Received: 133

There was also a Renko trading Signal on the Traders-laboratory forum. I had to tweak it because it had some bugs. Here it is.
 
Code
{Renko-Adaptive signal (based on ATR)

Written by konkop 07.03.2002.

*********************

Attention: set MaxBarsBack (f.e. =30) in this study according with

MaxBarsBack value in the Renko_Adaptive indicator

for correct step-by-step calculations of the buy/sell levels

*********************}

 

Inputs: K(1),

Smooth(10),

goShort(false);

 

vars: Brick(0) ,DN(0), UP(0), BricksUp(0), BricksDn(0), MP(0);

MP = marketposition; 

Value1 = AvgTrueRange(Smooth);
 

If BarNumber = 1 Then Begin

Up = H;
Dn = L;

Brick = K*(H-L);

End;

 

If BarNumber > 1 then begin
If C > UP + Brick Then begin

BricksUp = IFF(Brick = 0, 0, Floor((C - Up)/Brick)*Brick);

UP = Up + BricksUp;

Brick = K*Value1;

DN = Up - Brick;

BricksDn = 0;

End;

If C < Dn - Brick Then begin

BricksDn = IFF(Brick = 0, 0, Floor((Dn - C)/Brick)*Brick);

Dn = Dn - BricksDn;

Brick = K*Value1;

Up = Dn + Brick;

BricksUp = 0;

End;

{Trade Rules with or without short trades}

If goShort = false then begin

If Up > Up[1] then buy next bar at market;

If Dn < Dn[1] then sell next bar at market;

End;

If goShort = true then begin

If MP = 0 and Up > Up[1] then buy next bar at market;

If MP = 0 and Dn < Dn[1] then sell next bar at market;

If MP > 0 and C < Dn[1] then sell next bar at market;

If MP < 0 and C > Up[1] then buytocover next bar at market;

End;

End;

Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
pha777
Taiwan
 
Posts: 5 since Feb 2020
Thanks Given: 1
Thanks Received: 2

Be care for use renko bar ,because it's repaint.
But if you use very well, it's good method.

Reply With Quote




Last Updated on February 1, 2020


© 2024 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 - Privacy Policy - Downloads - Top
no new posts