EA work on Renko chart ?

Cromo
488

I am just wondering if there are any special code for Renko chart?

I mean the same icustom is used for Renko chart?


 double Buff1=iCustom(NULL,TimeScale,"Renko indi",1,1);//buy 

In renko chart, how about TImeScale?

If EA attached on renko chart , TImeScale =??

Also what about icustom shift?  Shift 1=previous bar , just like normal chart?

Usual EA works on renko chart?  or need to modifiy the code for renko?

Keith Watford
Moderator
35015
You use iCustom to get values of an indicator's buffers, you can't use it with a chart.
Cromo
488
Cromo  
Keith Watford:
You use iCustom to get values of an indicator's buffers, you can't use it with a chart.

Thanks, Keith

I attaced the EA on renko chart, Renko is offline but it is creating new bar every 2min.

After attached EA, EA has indicator arrow signal (using icustom) but EA sometimes doesn't open order.

Ofcource this EA works well in normal chart (not renko chart)

I don't know why... Do you know why?

Fernando Carreiro
9846

kajironpu: I attaced the EA on renko chart, Renko is offline but it is creating new bar every 2min.

After attached EA, EA has indicator arrow signal (using icustom) but EA sometimes doesn't open order.

Ofcource this EA works well in normal chart (not renko chart)

I don't know why... Do you know why?

Because in order for an ordinary EA to work on any Offline Chart (like that of a Renko), the generator of the Offline Chart must also simulate sending tick events to that chart. Otherwise the EA's OnTick() event handler  is never promptly called.

One way to see if the generator is in fact producing tick events or not, is to look at the Renko Offline Chart and see if the Ask and Bid price levels are constantly updated in just the same way as a regular chart. If it is not doing that, then the EA will not work correctly. If you have the source code for the Renko generator, then it can be corrected to send the simulated tick events, but if you don't have the source then you will have to contact the author and request the change.

EDIT: If you look at my SpreadTracker Codebase publication you can have a look at the source code and see how the simulated ticks are produced. It is very old code and it may need some updating but it will be a starting point for updating the Renko generator if you have the source code.

Cromo
488
Cromo  
Fernando Carreiro:

Because in order for an ordinary EA to work on any Offline Chart (like that of a Renko), the generator of the Offline Chart must also simulate sending tick events to that chart. Otherwise the EA's OnTick() event handler  is never promptly called.

One way to see if the generator is in fact producing tick events or not, is to look at the Renko Offline Chart and see if the Ask and Bid price levels are constantly updated in just the same way as a regular chart. If it is not doing that, then the EA will not work correctly. If you have the source code for the Renko generator, then it can be corrected to send the simulated tick events, but if you don't have the source then you will have to contact the author and request the change.

EDIT: If you look at my SpreadTracker Codebase publication you can have a look at the source code and see how the simulated ticks are produced. It is very old code and it may need some updating but it will be a starting point for updating the Renko generator if you have the source code.

Hi, Fernando

Thank you.I use renko generator and the renko chart is updating realtime by tick data. (like 2min chart candle bar, I can modify anything)

But EA does not open order even arrow signal appear.

I use icustom to get buffers from the indicator. Ofcource this EA open order in normal chart (not renko)

So I wonder if there is any special use for icustom for Renko chart....

Or just normal icustom is OK with Renko chart?

Fernando Carreiro
9846
kajironpu:

Hi, Fernando

Thank you.I use renko generator and the renko chart is updating realtime by tick data. (like 2min chart candle bar, I can modify anything)

But EA does not open order even arrow signal appear.

I use icustom to get buffers from the indicator. Ofcource this EA open order in normal chart (not renko)

So I wonder if there is any special use for icustom for Renko chart....

Or just normal icustom is OK with Renko chart?

I think you are misunderstanding my post as your answer did not address the points I mentioned. It does not matter if the generator is promptly updating the 2min bar or not.

Is it updating the Ask and Bid Price Lines continuously? That is the most important part! Show us a screen shot to confirm!


Mohamed Nabil Zaki
12274
When I make any EA and I want it to be compatible with renko chart or any other offline chart I simply call the onTick event from onTimer and I set timer 1sec  and right above the call to onTick I call use refreshRates and chart update methods this makes the EA to have the latest tick data every one sec and therefore works on Renko chart . 
Cromo
488
Cromo  
Fernando Carreiro:

I think you are misunderstanding my post as your answer did not address the points I mentioned. It does not matter if the generator is promptly updating the 2min bar or not.

Is it updating the Ask and Bid Price Lines continuously? That is the most important part! Show us a screen shot to confirm!


Oh, I got what you mean.  Is it updating the Ask and Bid Price Lines continuously....

I will check and reply again. Thanks!

Cromo
488
Cromo  
Mohamed Nabil:
When I make any EA and I want it to be compatible with renko chart or any other offline chart I simply call the onTick event from onTimer and I set timer 1sec  and right above the call to onTick I call use refreshRates and chart update methods this makes the EA to have the latest tick data every one sec and therefore works on Renko chart . 

Hi, Mohamed Thank you for usuful information.

To call tick every 1sec, Do I need EventKillTimer?

void OnDeinit(const int reason){
   EventKillTimer();
}

If you know some code sample , I am very appriciated.

Cromo
488
Cromo  
Fernando Carreiro:

I think you are misunderstanding my post as your answer did not address the points I mentioned. It does not matter if the generator is promptly updating the 2min bar or not.

Is it updating the Ask and Bid Price Lines continuously? That is the most important part! Show us a screen shot to confirm!


Hi, Fernando

I checked the realtime renko, but it shows only one line.

I don't know if it is Ask or Bid but only one line is moving realtime.

Files:
renko.jpg  45 kb
Fernando Carreiro
9846
kajironpu: I checked the realtime renko, but it shows only one line. I don't know if it is Ask or Bid but only one line is moving realtime.

When there is only one line, it is the Bid. Check that it is in fact being continuously updated. If it is not, then the generator is not updating it and that will be your problem.