| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| What is the differance between an Indicator,EA,or Script? https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1134 |
Page 1 of 2 |
| Author: | snakedoctor [ Wed Nov 21, 2012 2:50 am ] |
| Post subject: | What is the differance between an Indicator,EA,or Script? |
I tried Jemook's method of sinking Indicators, EA's,and Scripts using Drop Box. Unfortunately now some are mixed up. How do I tell the difference between an Indicator,an EA,or Script? |
|
| Author: | Jemook [ Wed Nov 21, 2012 2:59 am ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
Eep! Hi there. You should sync each folder separately. Empty4/Experts/Indicators -> Dropbox/Indicators Empty4/Experts/Scripts -> Dropbox/Templates Empty4/Templates -> Dropbox/Templates Then you can link the respective directories in the other Empty4 folders back to the dropbox. Don't try and sync your ea folder (Empty4/Experts) as it contains subdirectories which shouldn't be synced. Only Indicators, Scripts & Templates. Good luck champ. |
|
| Author: | garyfritz [ Wed Nov 21, 2012 5:31 am ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
If you've already mixed them up, you may be in for a challenge. Without some good understanding of MQL, it's hard to tell the difference among the three. The folder they're in is the best clue. |
|
| Author: | snakedoctor [ Wed Nov 21, 2012 9:32 pm ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
Yep, My problem is I messed them up from the start. Some were copied from Forex Factory & other sites & put in the wrong folders. Others were in the right folder until I synced the experts folder with drop box. This ended up with duplicate directories in drop box. I guess you can see where this is going! Well the good thing is they are just demo accounts. I can download an set up my real account unsynced. But, I would still like to know some way to tell the difference! Even if I had to look at the code! |
|
| Author: | garyfritz [ Wed Nov 21, 2012 11:30 pm ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
Search for SetIndexBuffer -- if you find that, it's an indicator. Search for OrderSend -- if you find that, it's an EA. (Or it could be a script. I actually don't know how to tell a script and an EA apart... That should cover most cases. |
|
| Author: | snakedoctor [ Wed Nov 21, 2012 11:49 pm ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
Thanks, Gary That will give me something to work on! |
|
| Author: | gaheitman [ Thu Nov 22, 2012 1:38 am ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
Scripts generally don't have init() / deinit() procedures. George |
|
| Author: | garyfritz [ Thu Nov 22, 2012 2:00 am ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
That's what I thought too, but I checked several and they DID have 'em. Why wouldn't/shouldn't scripts need init/deinit? |
|
| Author: | gaheitman [ Thu Nov 22, 2012 2:39 am ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
Because by definition they are supposed to run once. EAs are triggered on incoming ticks, so naturally loop through start() again and again. Init/deinit gives you a place outside of that loop to set things up and tear them down. Well, that's why I would have done it. Can you confirm the init() is being called in the script? I checked some of mine and they didn't have them. The template that metaeditor starts with for scripts doesn't have them either. Code: Select all |
|
| Author: | garyfritz [ Thu Nov 22, 2012 3:25 am ] |
| Post subject: | Re: What is the differance between an Indicator,EA,or Script |
Yup, it's called. The "10.2a DP BUY/SELL" scripts that somebody (Steve?) wrote a while ago have init(). It calls a message box from init() to see if you want to use the script. I double-checked it by adding a Comment() at the end of init(). If you put an EA into the scripts directory, would it act like a script? The code seems to be about the same so I'm guessing the different behavior must be driven by the different location. |
|
| All times are UTC | Page 1 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|