- Most Forex traders lose all their money.
- Using the robot posted here in trading Forex does not guarantee success.
- Trading this robot could lead to serious financial loss.
- Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
- This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
- At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
- To trade this robot, you have to understand:
- How to use EA's.
- Bob's HGI indicator.
This forum is thanks to the generosity of Steve Hopwood. I hope that what I have learned and applied to the my current version of HGB bots will be useful for you!
I am a US based trader, using Empty4. I currently use Oanda for my trading platform.
I have followed nanningbob, and use HGB. I was getting many trade-related errors. Often the errors caused an intended trade to not execute, at all. I developed 4 fundamental functions that dealt with the most common server-side 'errors' that were being thrown....especially to US traders who deal with FIFO limits. Since most of the people on this site are non-US traders, I find some excellent EA's ... only to be limited by the US FIFO law. So, I have worked to create workarounds for the FIFO traders. They do NOT go around the FIFO issues, but they will close out orders in proper sequence, to avoid errors, and non-closing trades when an EA attempts to close an out-of-sequence trade order.
In the end, I re-wrote the overall "flow" of the routines. I had struggled with duplicate trades, odd behaviors of results. Rather than just add patches, I decided to document the existing program logic flow, modify it to fit my own personal logic patterns, and then resubmit it. I have NOT written lots of new code. The people on this site and various forums are excellent at sharing what they have developed. I have tried to use their work (sometimes modified to fit my US needs), and then add specific features that I could not find elsewhere. Essentially, I just re-arranged the existing sub routines, and removed subroutines that caused duplication.
My basic plan has been to use HGI and the HGB EA. I recognize that it works best with good solid trends. I wanted to get it working very well, before I ventured out and tried to adapt other EA material to a US-limited environment. I have used the core of work done by boinvest (no longer on the threads).
I have re-written 4 functions to handle all ordersend, ordermodify, orderclose and orderdelete calls. These 4 functions will handle recursive attempts to deal with common 136, 137, 138, 141, errors...
I then experienced the FIFO error that US forex traders deal with. I eventually resolved that issue with CloseEarlierTrades(). I have written this code so that I if the EA is trying to close one particular trade, ALL prior trades of that symbol will be closed before the current trade will be closed, regardless of trade comment/type. This applies only to US traders. If your broker is not FIFO compliant, this feature will not affect your trading...it will allow the trades to execute as requested by the EA.
You must install the feature "hgb_lib.mqh" and "TradeContext.mqh" in the includes folder and "hgi_lib.ex4" in libraries folder before the EA will function properly
UPDATE: Jul 4, 2019. Z_trailingBuyStop.mq4 is actually for BUY / SELL trades. It is a stop entry EA that uses a 'trail' to capture a best entry point.