Renko Charts

extremist

Well-Known Member
#11
mr. ford..........
look the code care fully i changed it lill bit to have my own setting for the brick size and reverse
as pratap sir told use it on 1M chart and find ur own working combination. the thread owner or somebody asked for the code i gave it. even written at the bottom if any problem plz ask.

and for NIFTY it even works for brick size 1 and reverse 1.
if u want some thing out of something u will find the way or will end up in complaining song.
 
Last edited:

mrm

New Member
#13
Foed7 and Extremist
Thank you for help and explanation With your help I have two out of three versions working.I'm suprise this charting is not used more oten
Emil
 

mastermind007

Well-Known Member
#16

mastermind007

Well-Known Member
#17
hi
even this code faces same problem as other codes.

Amibroker becomes weak when it comes to barcount and array values less than zero etc.
This is like a curse on Amibroker.
read
//Brick size is dependant on what you want, if too small will not produce a
//chart due to insufficient x-axis bars




ERROR 10-FIXING NEEDS MODIFYING CODE LINES-NOT EASY ON NEW USERS OF AMIBROKER
===========================================
Error 10. Subscript out of range. You must not access array elements outside 0..(BarCount-1) range
Occurs when you attempt to access array elements with subscripts below 0 (zero) or above BarCount-1.

// incorrect
for( bar = 0; bar < BarCount; bar++ )
{
a[ bar ] = C[ bar - 1]; // when i == 0 we are accessing C[-1] which is wrong
}


// correct
for( bar = 0; bar < BarCount; bar++ )
{
if( bar > 0 )
a[ bar ] = C[ bar - 1 ]; // only access C[ i - 1 ] when i is greater than zero
else
a[ bar ] = C[ 0 ];
}


===================

So if you can modify your code, it works.
second thing
brick size can be defined and be made for symbol specific.
like
if symbol is NIFTY, BRICKSIZE =10
IF SYMBOL IS L&T, bricksize = 4
------------------
if( Name() == "NIFTY" ) ,BRICKSIZE =10 // CORRECT - equality operator used properly
{

}


-----------------------
This type of code is needed. once you insert this code, the afl automatically changes to right brick size and you get chart ready.
EXACT CODE LINES TO BE WRITTEN AND INSERTED.

--------------
FIX ERROR10
BRICKSIZE PREDEFINE AND INSERT IT

these can solve the problem.
Ford, You actually were on right track about getting the brick size but were one indirection level shorter.
 

Similar threads