Easy Expert Functions - Include file
  #1 (permalink)  
Old 12-10-2007, 09:20 PM
Freshman
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 2 Times in 1 Post
fuzzbomb is on a distinguished road
Default Easy Expert Functions - Include file

While coding my own experts, I realized that the process for opening/closing orders, etc. is pretty much the same every time, and I kept reusing the same code every time I wanted to try a new strategy.

Instead of having to write new code each time to open and close orders, I decided to write an include file with functions that will do it automatically, and keep track of the state of opened/closed orders, trailing stops, adding to profitable positions and hedging.

The end result is that it takes minutes to code an EA to try out a new strategy using different indicators. That way, the programmer can concentrate on coding buy/sell logic instead of dealing with routine actions.

Try it out, modify it and let me know if you like it or have any suggestions.
Attached Files
File Type: mqh EasyExpert.mqh (16.0 KB, 29 views)
File Type: mq4 EasyExpert MA Cross.mq4 (783 Bytes, 26 views)
Sponsored Links EA Shark +1064% Return
Stock Market Crash? No Problem!
We Are Making Profits As Usual. More Info
Reply With Quote
The Following 2 Users Say Thank You to fuzzbomb For This Useful Post:
  #2 (permalink)  
Old 12-11-2007, 12:09 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,992
Thanks: 125
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Thanks for sharing. I did something similar a year back but eventually decided to embed all lib functions in every EA due to weird issues. I suspect that it is related to concurrency. When Two or more EAs used the lib in the same terminal, variables became mixed and the executions somehow didn't go through.

I distinctively remember some functions couldn't execute in MQH file, and all EA settings (Allow live trading, allow short/long/both orders, etc) didn't apply to function calls in MQH file.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #3 (permalink)  
Old 02-06-2008, 04:44 AM
Freshman
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
fm121 is on a distinguished road
Default

i tried it, and it did not work

this what i get:

2008.02.05 23:41:44 2008.02.06 04:39 EasyExpert MA Cross GBPJPY,M15: OrderSend error 130
Reply With Quote
  #4 (permalink)  
Old 02-10-2008, 08:11 AM
Freshman
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 2 Times in 1 Post
fuzzbomb is on a distinguished road
Default

In retrospect, that was an early beta version and I've since discovered a lot of bugs. I may release a more polished version in the future, but not until I'm confident that it works well.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Excel file goldstock MetaTrader and ZeroCode 2 04-30-2007 01:50 PM
Reversing an EA (I have mq4 file) generaldee System Coding 1 02-10-2007 03:42 AM


All times are GMT. The time now is 01:09 PM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now