| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Need some help with indicator and ea coding https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=766 |
Page 1 of 2 |
| Author: | s01 [ Tue Aug 14, 2012 3:36 pm ] |
| Post subject: | Need some help with indicator and ea coding |
Well I knew it would come to this, so might as well get this started. First off let me say ANY help is greatly appreciated. I am not a coder, I modify just about every indicator and ea that I have. Keeps me busy so I am not watching every damn tick of the charts. I am more of a cut and paste coder, I do occasionally get a working indy or ea that works how I want. But My pile of trashed code is growing. Right now I am working on a ea that will implement my thoughts into real live trading results, yep the holy grail. Probably grow old and die before I get it right, but I'll die tryin. Anyway first up is a simple (yea right) piece of code from a ea that you have to set the digits of the broker manually. I thought with all the samples out there how hard could it be? Well after screwing around with 50 variations ( ok slight exageration), but 5 hrs worth, it still wont work or even come out error free. I submit for you humor, my attempt along with the original code for some help before I take the keyboard and kill the dog. Original code Code: Select all Code: Select all But I get a 'AcctDigits' - variable not defined error on only the lower section of the code, below the double PointEx(). and a unbalanced parentheses errror at the end, But that does not show up in the Empty4 editor or the SciTE editor as a problem? Again help save a few lives, help a suffering soul out ... Thanks again in advance ..... so1 / Steve |
|
| Author: | rwb181 [ Tue Aug 14, 2012 3:58 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
Hi, I haven't really looked this over closely but, one thing that pops out right off the bat is this; int DIGITS = MarketInfo (chart, MODE_DIGITS); DIGITS should be a double type variable not an integer. As an integer, I think it will return zero. Another is this; int AccDigits = MarketInfo, chart, digits; Again, needs to be a double, not an integer. And, no parenthesis. Ron |
|
| Author: | s01 [ Tue Aug 14, 2012 4:05 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
Hi, I tried using int DIGITS = MarketInfo (Symbol, MODE DIGITS): but it returned a error. I tried many variables from 5-7 different auto adjust code snippets, but none came back without errors. Steve |
|
| Author: | rwb181 [ Tue Aug 14, 2012 4:07 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
My mistake, it is supposed to be an integer. I don't have any brain cells that are firing at the moment. "But I get a 'AcctDigits' - variable not defined error on only the lower section of the code, below the double PointEx(). and a unbalanced parentheses errror at the end" That could be because of the missing parenthesis I mentioned. Try int AccDigits = MarketInfo(chart, MODE_DIGITS); |
|
| Author: | rwb181 [ Tue Aug 14, 2012 4:21 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
Code: Select all |
|
| Author: | s01 [ Tue Aug 14, 2012 4:24 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
ok, well changed it to this. Code: Select all 251:32;'SYMBOL' - variable not defined 253:8;'(' - function definition unexpected 264:7;'AccDigits' - variable not defined 265:7;'AccDigits' - variable not defined 266:7;'AccDigits' - variable not defined 267:7;'AccDigits' - variable not defined 270:4;'}' - unbalanced parentheses >Exit code: 7 Steve / s01 |
|
| Author: | rwb181 [ Tue Aug 14, 2012 4:28 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
264:7;'AccDigits' - variable not defined That is beacause you commented out AccDigits here; //double AccDigits = MarketInfo, (symbol, digits); 251:32;'SYMBOL' - variable not defined Is because variables are case sensitive; symbol and SYMBOL needs to be "Symbol()" |
|
| Author: | s01 [ Tue Aug 14, 2012 4:31 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
Tried mine, then saw your post, Tried yours, and I get this back: 288:32;'chart' - variable not defined 289:30;'chart' - variable not defined 291:12;'(' - function definition unexpected 302:11;'AccDigits' - variable not defined 303:11;'AccDigits' - variable not defined 304:11;'AccDigits' - variable not defined 305:11;'AccDigits' - variable not defined 308:1;'}' - unbalanced parentheses >Exit code: 8 No joy just yet ... |
|
| Author: | s01 [ Tue Aug 14, 2012 4:42 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
ok, tried the Symbol() thing: Code: Select all 289:9;'AccDigits' - variable already defined 291:12;'(' - function definition unexpected 302:11;'AccDigits' - variable not defined 303:11;'AccDigits' - variable not defined 304:11;'AccDigits' - variable not defined 305:11;'AccDigits' - variable not defined 308:1;'}' - unbalanced parentheses >Exit code: 7 |
|
| Author: | rwb181 [ Tue Aug 14, 2012 4:44 pm ] |
| Post subject: | Re: Need some help with indicator and ea coding |
I'm at a loss. Sorry I couldn't help (and probably confused you more) |
|
| All times are UTC | Page 1 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|