HGB FIFO and Error Traps Thread

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
pt2004
Trader
Posts: 40
Joined: Sun Nov 27, 2011 3:12 pm
Location: Portugal

HGB FIFO and Error Traps Thread

Post by pt2004 »

MurphyMan » Tue Mar 31, 2015 1:56 pm wrote:I wish I could have posted results from last week, unfortunately, my computer had a severe crash last week and I had to take in to a shop (Which I NEVER do).

I started a fresh FXCM demo on Sunday evening and as of this morning, things are looking very good - up 1,112 pips! Incredible. :hi: Same set file as previously posted.

Some kind of magic going on here. BTW - I just scrolled through all the alert messages, and not one error alert!

Thanks to all.

Sam

Hi, great results :!!:

What version do you use ? Original or spgandau?

Best regards

PT
User avatar
MurphyMan
Trader
Posts: 345
Joined: Tue Nov 15, 2011 2:35 pm
Location: Southern Illinois, USA

HGB FIFO and Error Traps Thread

Post by MurphyMan »

pt2004 » Tue Mar 31, 2015 12:48 pm wrote:
Hi, great results :!!:

What version do you use ? Original or spgandau?

Best regards

PT
The version in Post #1 of this thread. 10.7 HGB_v01e_strict_spgandau.

Cheers
pt2004
Trader
Posts: 40
Joined: Sun Nov 27, 2011 3:12 pm
Location: Portugal

HGB FIFO and Error Traps Thread

Post by pt2004 »

MurphyMan » Tue Mar 31, 2015 8:28 pm wrote:
pt2004 » Tue Mar 31, 2015 12:48 pm wrote:
Hi, great results :!!:

What version do you use ? Original or spgandau?

Best regards

PT
The version in Post #1 of this thread. 10.7 HGB_v01e_strict_spgandau.

Cheers

Ok,

Thank You ;)
User avatar
remix919
Trader
Posts: 91
Joined: Wed Jan 23, 2013 2:42 am
Location: Some Road in the USA

HGB FIFO and Error Traps Thread

Post by remix919 »

Great stuff! Maybe Steve could integrate this into part of his shell EA, but dunno how complicated that could be?

Quick question, will this work on any US broker (I use Oanda for example) or is this coded specifically to FXCM only?
EA's are the best way to trade. Why? Because they take the emotion out of trading.
spgandau
Trader
Posts: 50
Joined: Thu Sep 20, 2012 2:17 am

HGB FIFO and Error Traps Thread

Post by spgandau »

remix919 » Thu Apr 02, 2015 10:53 am wrote:Great stuff! Maybe Steve could integrate this into part of his shell EA, but dunno how complicated that could be?

Quick question, will this work on any US broker (I use Oanda for example) or is this coded specifically to FXCM only?
It works with Empty4. If Oanda uses Empty4, it should work fine.
It can be worked into the EA shell. Perhaps at some future date, that might be done. Since it is a US-centric issue, there does not seem to be many users who need these features.

Cheers!
User avatar
MurphyMan
Trader
Posts: 345
Joined: Tue Nov 15, 2011 2:35 pm
Location: Southern Illinois, USA

HGB FIFO and Error Traps Thread

Post by MurphyMan »

What Forex giveth, Forex taketh away. At one point I was up almost $300 on a $10,000 demo. Now, I've lost all that but $27.

I want to let this run without too much messing around just to see how it does.

I am getting a bunch of error messages and alerts. Not sure if they are from HGB FIFO or the HGM basket manager.


LookForTradeClosure called CloseEarlierTrades NZDJPY, original ticket# is: 65619938 with order open time: 2015.04.01 16:58:06

2015.04.03 12:58:33.020 10.7 HGB_v01e_strict_spgandau EURUSD,H4: Inside TradeContext.mqh, TradeIsBusy(), 2nd while..loop, the waiting time in TradeIsBusy() (30 sec) was exceeded!

CloseAllTrades called CloseEarlierTrades EURUSD, original ticket# is: 65816824 with order open time: 2015.04.03 16:11:31
spgandau
Trader
Posts: 50
Joined: Thu Sep 20, 2012 2:17 am

HGB FIFO and Error Traps Thread

Post by spgandau »

MurphyMan » Fri Apr 03, 2015 1:00 pm wrote:What Forex giveth, Forex taketh away. At one point I was up almost $300 on a $10,000 demo. Now, I've lost all that but $27.

I want to let this run without too much messing around just to see how it does.

I am getting a bunch of error messages and alerts. Not sure if they are from HGB FIFO or the HGM basket manager.


LookForTradeClosure called CloseEarlierTrades NZDJPY, original ticket# is: 65619938 with order open time: 2015.04.01 16:58:06

2015.04.03 12:58:33.020 10.7 HGB_v01e_strict_spgandau EURUSD,H4: Inside TradeContext.mqh, TradeIsBusy(), 2nd while..loop, the waiting time in TradeIsBusy() (30 sec) was exceeded!

CloseAllTrades called CloseEarlierTrades EURUSD, original ticket# is: 65816824 with order open time: 2015.04.03 16:11:31
these messages are the trace that allows you to determine which function actually began the trade calls.

In the first line, LookforTradeClosure determined that NJ ticket needed to be closed, and the default was to look at CloseEarlierTrades for possible earlier NJ trades the needed to be handled first (not including pending trades). that is a normal message. no error there.

The 2nd line does throw a "fault' which seems to have been that TradeContext.mqh never received a clear signal that the trade context was free. It waited 30 seconds for the Empty4 server (broker), but the server context was never made free to make a trade. After 30 secs, TradeContext.mqh quit trying, and the trade never took place. That appears to be a server (broker) issue. It correctly showed you that an error had been thrown, and why.

The third line shows that all the trades (of this pair) needed to close and this message just told you the sequence of functions that were called to get the trades to close. CloseAllTrades was called by the EA. So, CloseAllTrades sent the ticket # to CloseEarlierTrades to ensure that any earlier trade of NJ was closed before ticket #65816824 was closed. no error there. just a message

If these messages (like the first and third line) cause confusion, you can rem them out, and just deal with the true error messages when they are thrown like in middle line.

I hope this helps.

Cheer and good trading.
User avatar
MurphyMan
Trader
Posts: 345
Joined: Tue Nov 15, 2011 2:35 pm
Location: Southern Illinois, USA

HGB FIFO and Error Traps Thread

Post by MurphyMan »

spgandau » Sat Apr 04, 2015 12:48 pm wrote:
these messages are the trace that allows you to determine which function actually began the trade calls.

In the first line, LookforTradeClosure determined that NJ ticket needed to be closed, and the default was to look at CloseEarlierTrades for possible earlier NJ trades the needed to be handled first (not including pending trades). that is a normal message. no error there.

The 2nd line does throw a "fault' which seems to have been that TradeContext.mqh never received a clear signal that the trade context was free. It waited 30 seconds for the Empty4 server (broker), but the server context was never made free to make a trade. After 30 secs, TradeContext.mqh quit trying, and the trade never took place. That appears to be a server (broker) issue. It correctly showed you that an error had been thrown, and why.

The third line shows that all the trades (of this pair) needed to close and this message just told you the sequence of functions that were called to get the trades to close. CloseAllTrades was called by the EA. So, CloseAllTrades sent the ticket # to CloseEarlierTrades to ensure that any earlier trade of NJ was closed before ticket #65816824 was closed. no error there. just a message

If these messages (like the first and third line) cause confusion, you can rem them out, and just deal with the true error messages when they are thrown like in middle line.

I hope this helps.

Cheer and good trading.
Thanks for the explanation, I get it now. Also, my internet service has been in the crapper lately. The download speed bounces from a high of 6 mbps, down to 1 mbps. :arrrg: Frontier keeps blaming a new apartment complex two miles away causing "congestion". So, I'm sure that's where the server errors are coming from. May be time to move to an external server.
coolsnake
Posts: 9
Joined: Mon Feb 13, 2012 12:40 am

HGB FIFO and Error Traps Thread

Post by coolsnake »

Thanks for your mqh file.
User avatar
boldtrader
Trader
Posts: 158
Joined: Fri Jun 29, 2012 10:05 pm
Location: Somewhere in the Northeast Kingdom.

HGB FIFO and Error Traps Thread

Post by boldtrader »

Hi team.. Just to throw in an alternative or option.. I am a US based trader.. and I am able to trade in both directions simultaneously, with total disregard to the FIFO rules. I use ATCBrokers, who gets their feed wholesale from FXCM and I think partially from Citi. ATC"s backoffice software handles the FIFO rules automatically, allowing me total freedom. Their minimum is $5,000 to open account. No requotes.. great narrow spreads, excellent service and support. I have been with them for about 7 years now.. and is the ONLY Empty4 broker I trust. I am sure there are others out there, and I have written here in SHF several times about them and their operations, servers, etc. They are not for everyone, but for me, they are the best.

I really enjoy and prefer their Advance Order Entry Script for trading, which has built in trade management, multi-leg order entry, etc. You may want to give them a strong look. All of the code work you are doing here, is not needed with their feed. So you may want to consider them as an alternative. The program and systems I am developing are specific developed specific to ATC and their feed.

Cheers.

BT.

disclaimer: I am not an IB for ATC. However.. I do highly recommend their services.
"Make Your 20, Bank Your Money... WFY II"
My Mission: Help families grow income, protect assets, erase debt, and gain financial independence.[/b]
Post Reply

Return to “Thingy Bob EA's”