PacMan (my first hybrid) - page 5

 

News DLL

rainx:
Uhm no but such a DLL could be coded in a matter of a few hours... or maybe check the forum if such a DLL has been developed already.

A guy called Derk Wehler has written a news extraction indicator. The indicator calls DLLs to fetch a special XML file from the ForexFactory web site. It then parses it and writes it out as a .CSV file, which it places in the folder: experts/files. It can use that file to tell if it is near announcement time.

See attached.

Files:
ffcal_v04.mq4  41 kb
 
fxgold:
A guy called Derk Wehler has written a news extraction indicator. The indicator calls DLLs to fetch a special XML file from the ForexFactory web site. It then parses it and writes it out as a .CSV file, which it places in the folder: experts/files. It can use that file to tell if it is near announcement time. See attached.

I saw this a couple of days ago but didn't pay much attention. Could you post the link to this site please? Thanks very much.

Cheers,

 

Okay, I found it

The url is:

https://www.mql5.com/en/forum/176442

Thanks fxgold.

Cheers,

 
rainx:
No problem. I have a differnet Idea to reduce risk :-) Have you heard of Kelly's Theorem? Its the best money management algorithmn I know - have used it in my own indicators. ...

Kelly formulas are very good for that purpose. I collect statistics in my variant of Goblin Bipolar to measure probabilities. Then your risk of ruin is computable and you see how much you could scale up lot sizes to get optimal geometric growth. Full Kelly percentage is usually too aggressive, use a fraction of it (e.g. 25%), this reduces your risk of ruin to about 1%.

 
alassio:
Kelly formulas are very good for that purpose. I collect statistics in my variant of Goblin Bipolar to measure probabilities. Then your risk of ruin is computable and you see how much you could scale up lot sizes to get optimal geometric growth. Full Kelly percentage is usually too aggressive, use a fraction of it (e.g. 25%), this reduces your risk of ruin to about 1%.

Hehe so we finally agree on something. As I said I used 10% of the Kelly-Formular in my own EAs - which was perfect. Full Kelly is suicide because of margin call which he didnt implement in his Theorem. And because you don't have exact risk percentages - just approximated values. Since the Theorem is mathematically provable to be thebest method of getting the perfect risk:reward ratio it should be implemented in every EA... I hardly see it however

Is there any chance that you can send me your Goblin version to inspect your implementation of the algorithmn?

 
rainx:
...Is there any chance that you can send me your Goblin version to inspect your implementation of the algorithmn?

See my post at

https://www.mql5.com/en/forum/175850/page41

It collects statistics and prints out Kelly factors and how much you could scale up your lot sizing. It does not apply these factors, if you want to then set DynamicLots=true and adapt LotBaseEquity and LotBaseSize accordingly.

Note that Kelly lot sizing is not perfect, you need a consistent winner rate and the optimal growth rate generates large equity fluctuations. But it is simple and has a sound mathematical/statistical basis. Choose lot sizing that grows with a constant factor of your equity and make sure your factor is near the Kelly rate divided by a chosen security factor.

 

I have started forward testing the pacman using default setting on eurusd h1. I know that it's still not perfect yet, but ... lets just give it a try Today, it finished one trade with profit. Let's see in couple of days.

Cheers,

Files:
pacman.gif  5 kb
pacman.htm  8 kb
 

Heres another backtest for those who like to see it run for 4-5 months streight through. It almost got into trouble 1 time in 4-5 months, but recovered nicely.

I have a lot of ideas. My own and some of yours. One thing I'd like to try is to make it close all trades if market volume drops below certain level. Because in thin markets the big banks like to push price around and find stops to propel there orders for more profit.(thats real stop hunting) This is when we are vulnerable to a sudden move the wrong way. Closing on low volume might be a bad thing or might not. Just like to test theory.

And I need it to recognize the Long profit and short profit, for it to read target equity only on the pair its on. Cause right now I am just running one pair.

I'll get it figured out.

Dave

 

Some more ideas

xxDavidxSxx:
...I have a lot of ideas. My own and some of yours. One thing I'd like to try is to make it close all trades if market volume drops below certain level. Because in thin markets the big banks like to push price around and find stops to propel there orders for more profit.(thats real stop hunting) This is when we are vulnerable to a sudden move the wrong way. Closing on low volume might be a bad thing or might not. Just like to test theory. ...

Your ATR<90 idea works. It is a useful safeguard to avoid jumping into a market for which the settings are not usable.

I don't know about Volume yet, let's test it ...

Additional ideas:

- Order management: Closing a trade of 5-10 orders is very vulnerable to slippage. Only the last order closed by TP gets the desired result usually. Since I don't believe in positive slippage, how about the following modification:

Instead of individual SL and TP and closing each order individually, we could use only ONE opposite order which offsets the other orders. This one could be managed using two pending limit orders for TP and SL. Of course only one of them triggers and the other one will then be deleted.

We still need to get rid of the orders sometimes by closing them. We should be able to use CloseOrderBy() calls to close them without closing orders individually and paying spread/slippage. I need to test this idea.

- Use shadow SL, TP for orders posted to broker to disguise our strategy. Use real SL, TP as soft stops. (I already do this to circumvent TP distance limits)

- Bluto has turned Goblin into Goblin bipolar, which can run a buy and a sell cycle at the same time => generalize this concept to allow N parallel trades to be managed. This can be useful e.g. for two things:

x Use independent hedge trades for num trades > some limit

x Take over and manage trades entered MANUALLY => this is my Goblin Assistant idea: Goblin EA only manages trades and YOU are the signal generator

- More experiments at the entry signal side. I like your work on CCI.

Remember that we need as high an edge as possible. The Goblin order management can increase success probability by rising risk also, but we still wouldn't like a series of SL in a row ...

- Drawdown management: Still waiting for bluto to publish his solution ...

 

Getting this error:

2007.03.22 12:55:59 '9009430': order sell 0.02 EURAUD opening at 1.6526 sl: 0.0000 tp: 1.6503 failed [Trade is disabled]

Something I'm doing wrong?

Thanks

Reason: