| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Renko Coding Question? https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=209 |
Page 1 of 1 |
| Author: | ewinner [ Tue Jan 03, 2012 4:09 pm ] |
| Post subject: | Renko Coding Question? |
Hi Everyone, Im a long time trader of renko blocks and have been working on a strategy that involves 2 offline charts, a 5 pip renko block (M2 offline) and a 10 pip renko block (M3 offline). I want to try and automate a strategy using values from both charts but having problems, my question is - if i place the EA on the 5 pip chart i can call in the values easily for that chart using '0' as the timeframe, but how do i get the values from the 10 pip block offline chart? Ive tried changing the timeframe to, PERIOD_M3 (and define it at the top), but this does not work. --------------------------------------------------------------------------------------------------------------------------- void pip10() { pip10 = none; if (iClose("EURUSD",PERIOD_M3,1) > iOpen("EURUSD",PERIOD_M3,1)) pip10 = up; if (iClose("EURUSD",PERIOD_M3,1) < iOpen("EURUSD",PERIOD_M3,1)) pip10 = down; }//void pip10() ---------------------------------------------------------------------------------------------------------------------------- Ive searched Google, trawled the mql4 site but cannot find any similiar requests or code snippets to play with. Sorry if this is blatantly obvious, i just cannot see it.. Thanks for any advice/help on this.. Mark |
|
| Author: | gaheitman [ Tue Jan 03, 2012 4:38 pm ] |
| Post subject: | Re: Renko Coding Question? |
According to the fratelli thread (http://www.stevehopwoodforex.com/phpBB3 ... lose#p1662) what you are trying to do should work. The only thing I see is that they are using NULL instead of the currency name. Are you creating the M2 and M3 offline charts in the correct directory? George |
|
| Author: | ewinner [ Tue Jan 03, 2012 4:53 pm ] |
| Post subject: | Re: Renko Coding Question? |
Hi George, Thanks for your reply and link, i hadnt seen that thread Just changed the code to below which solved the problem perfectly Great stuff, learning everyday.. thanks again Mark ----------------------------------------------------------------------------------------------------------------- void pip10() { pip10 = none; if (iClose(NULL,3,1) > iOpen(NULL,3,1)) pip10 = up; if (iClose(NULL,3,1) < iOpen(NULL,3,1)) pip10 = down; }//void pip10() ---------------------------------------------------------------------------------------------------------------------- |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|