Getting crazy with Renko!

 

Hello Guys, i am getting crazy with Renko charts. I have correctly generated a Renko charts, but every ea that i code doesn't wor there. OnTick seems not working, also Start, i have tried this


init()

{

    EventSetTimer(1);

}

deinit()

{

    EventKillTimer();

}



void OnTimer()

{

    ChartRedraw();

    RefreshRates();

    EventSetTimer(1);

    //I put this comment to see that it's working

    Comment(Seconds()+"  "+Bid);

    //** the rest of your code **

   return;

}

But still not open trades. I am just using Open[x] and Close[x] no other indicators. Where am i wrong?

 
SIMONE MARELLI:

I have correctly generated a Renko charts, but every ea that i code doesn't wor there. OnTick seems not working, also Start,

But still not open trades. I am just using Open[x] and Close[x] no other indicators. Where am i wrong?

  1. OnTick will not work if your Renko generator doesn't send update messages.
  2. You posted code has no trading functions, nor does it look at Open/Close.
 
William Roeder:
  1. OnTick will not work if your Renko generator doesn't send update messages.
  2. You posted code has no trading functions, nor does it look at Open/Close.

The attached file is my renko generator. I have just wrote a simple code, rules are easy:

I simplify it:

double BOXUP1 = Close[1] > Open[1];
double BOXUP2 = "" 2;
double BOXUP3 = "" 3;
double DOWNBOX1 = Close[3] < Open[3];
double DBOX2
double DBOX1
double DBOX0
double UPBOX0

if( BOXUP1 && BOXUP2 && BOXUP3 && DBOX0)
sell

reverse for buy

code is so simple, but getting me crazy because in no way starts on renko candle. I have tried in normal way OnTick, with start, with the code i have sent, Calling ontick with OnTimer, very way doesn't work. Why?

Reason: