| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Need advise on this code https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3740 |
Page 3 of 5 |
| Author: | fxcba [ Sat Jul 26, 2014 3:32 pm ] |
| Post subject: | Need advise on this code |
Ok, here is |
|
| Author: | milanese [ Sat Jul 26, 2014 3:42 pm ] |
| Post subject: | Need advise on this code |
here you go, now the magicnumber calculation code should work too.. Cheers Tommaso |
|
| Author: | fxcba [ Sat Jul 26, 2014 4:02 pm ] |
| Post subject: | Need advise on this code |
Hey Tommaso, so all problem was the capital "m"? (I need to pay more atention Thank you |
|
| Author: | milanese [ Sat Jul 26, 2014 4:18 pm ] |
| Post subject: | Need advise on this code |
there were some minor thingies, like missing brackets, redefining a global variable and line 874 was incomplete.. Cheers Tommaso |
|
| Author: | fxcba [ Sat Jul 26, 2014 4:32 pm ] |
| Post subject: | Need advise on this code |
yes, that was me doing trial and error untill I commented all but I see that "MagicNumber" now is "magic_number", and "int isymbol=" is "int isymbol =0", so I think there were the main issue. thank you again cheers |
|
| Author: | fxcba [ Fri Sep 12, 2014 11:36 am ] |
| Post subject: | Need advise on this code |
Hello, It's me again I'm working on "iHigh" and "iLow" function and how it works, this line: HiPrice = MathMax(HiPrice,iHigh(NULL,PERIOD_CURRENT,shift+1)); makes the EA jumps in trade when price equals previous high, so, first question, what should be written to add a buffer in order to wait price exceed some pips the high? second question: there is also a several types of periods to choose instead "PERIOD_CURRENT", like "PERIOD_H2", in this case I asume Empty4 will read the high of the last 2 hours, Am I right?, taking this in acount my question is standard Empty4 charts starts at 0 h and ends 23:59 how to make script starts at 0 h reading 12 blocks of 2 hs, stop at 23hs and start again? Regards and thank you in advance |
|
| Author: | SteveHopwood [ Fri Sep 12, 2014 12:00 pm ] |
| Post subject: | Need advise on this code |
Declare a buffer that you can show as an extern or hard code to your chosen value: Code: Select all Code: Select all Over to someone else for that one. |
|
| Author: | fxcba [ Fri Sep 12, 2014 12:27 pm ] |
| Post subject: | Need advise on this code |
Hello Steve, thank you for your answer. Regarding second question I've be reading some ea's code and I think this can be done with a start day and hour I'll keep searching cheers |
|
| Author: | fxcba [ Fri Sep 12, 2014 3:15 pm ] |
| Post subject: | Need advise on this code |
Thank you again, it's working fine Where can I find some info about closing the trade on opposite signal?, so far this ea trades one direction untill takes profit or is stopped. Sorry for ask this way but I only devote a couple of hours a week to coding, so I'm trying to save some research time. Thank you |
|
| Author: | SteveHopwood [ Fri Sep 12, 2014 6:23 pm ] |
| Post subject: | Need advise on this code |
Download one of my shells from http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79. Go to void CountOpenTrades() and see how the function builds up a picture of trades belonging to the ea. Find this line of code: TradeWasClosed=LookForTradeClosure(OrderTicket()); to see how the closure function is called and what to do with the loop in the event of a trade being closed. Then look at bool LookForTradeClosure(int ticket) and see how you can set CloseThisTrade to true if your system has generated an opposite direction signal. I am not saying this is the only way, or even the best way to do this. I can say that it has worked time and time and time again for me. |
|
| All times are UTC | Page 3 of 5 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|