Deprecated: Assigning the return value of new by reference is deprecated in /var/www/xelsson.se/public_html/wordpress/wp-settings.php on line 520

Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/www/xelsson.se/public_html/wordpress/wp-settings.php on line 18

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1244

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/classes.php on line 1442

Strict Standards: Redefining already defined constructor for class wpdb in /var/www/xelsson.se/public_html/wordpress/wp-includes/wp-db.php on line 306

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /var/www/xelsson.se/public_html/wordpress/wp-includes/cache.php on line 431

Strict Standards: Declaration of Walker_Comment::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_el() should be compatible with Walker::end_el(&$output) in /var/www/xelsson.se/public_html/wordpress/wp-includes/comment-template.php on line 1266

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /var/www/xelsson.se/public_html/wordpress/wp-includes/class.wp-dependencies.php on line 31

Strict Standards: Redefining already defined constructor for class WP_Http in /var/www/xelsson.se/public_html/wordpress/wp-includes/http.php on line 61
What to do… » AutoHedge

Archive

Posts Tagged ‘AutoHedge’

Free EA update

July 24th, 2009

I am currently, since just a few days, trying a free EA that I’m actually quite excited about, the Gartley EA. It trades price patterns instead of just indicators and does very well in backtests. Very refreshing to see. There are a few different versions, but I’m actually trying the first one (v 1.01). The newer ones incorporate a special MACD indicator to filter trades and a news reader. I’ll try those versions later.

As for the other free EAs I’m running in demo there was a update for Quik DBS v2 this week that seems to behave very nice. It is a daily breakout trader by QuikSilver that I’ve written about earlier. If this weeks performance continues for 2-3 weeks more I’m very tempted to put it live actually. Of course I would only trade it with micro lots to start.

I’m also trying a free scalper found here: http://volatily-scalp.blogspot.com/. Seems quite good actually. Of course I have scalpers already (FAPT, FAPT Evo, MD and MD Pro) but I wouldn’t mind running another profitable one. Diversification is always very important.

Last but not least I’ve actually written my own EA, called TrendEAr, that I’m forward testing with quite good results this week. I had a few duds that I will try to filter out by adding a RSI indicator to gauge overbought/oversold market. It is a trend trader (I know, such a overused word) that tries to catch the bigger movements. In backtests the most profitable trades are open for days following the big trends. It is very heavy to run backtests with it because of the indicators used, so my optimization runs take about two weeks right now. As always I am struggling with the proper timing to enter and exit the trades, but it is starting to work nice I think. I’m currently demo’ing it on EURUSD, GBPUSD, GBPJPY and EURJPY using M30 timeframe.

With the disappointment, for me, with the new version of the GridBot I’m also considering restarting my AutoHedge EA that i wrote some time ago. I think I can make it into a hedged grid trader in a matter of hours. I’m thinking of a number of different approaches (pivots, Keltner channels (ATR), Fibo levels and so on) to adjust the grid positions and sizing. Since I will be writing a hedged trader I won’t have to worry about trends as much (since we’re trading with the trend also). The market movement that we will try to catch is the 100% retracement of course, then we make money both on the up and down movement with a hedged grid. I’ll keep you posted.

So, all in all I really think there are some high quality free EAs. But of course one have to run backtests and forwardtests before running them live. And when live, better start out small. I’m seriously thinking about funding a micro account and put them on soon. I’m tired of all the commercial EAs BS sales pitches and phony results.

New functions in my EA

June 22nd, 2009

First of all, I got some comments after my post about AutoHedge EA last week. All positive I’m glad to say. However I won’t release it to the public, at least not right now. I think it is better for everyone (including me perhaps) to wait for the v2.9 of GridBot. It will surely be very nice.

So what new functions have I implemented? Well other than some efficiency enhancements and ECN broker support I have implemented a function that monitors when GridBot opens a order and sends an inverse one immediately. The inverse order has the grid spacing as T/P (take profit). This means that the inverse order will T/P exactly when the GridBot wants to open another order.  I currently am limiting it to just open this one order, but it could be more general with some simple adjustments. It’s in demo testing right now :)

It is real fun to write EA:s I’ve found. Probably will try to make some more on my own, using other strategies.

Hedging the GridBot

June 20th, 2009

I was a bit bummed after sacking the GridBot from my live account this Thursday. The reason of course is that it once again hit the Safety net, losing me money. But since it really makes money when the market conditions are good I felt that it was time to try to write my own hedging EA to help GridBot out a little. So I did. Of course I don’t know if it will make me money in the long run, but at least it will reduce the risk of huge draw downs.

Basically what I have written is a EA that monitors all open trades in a currency pair and calculates the running profit/loss. If this running profit goes under a defined threshold value my EA opens a inverse hedge order in the pair, the size of the open orders. It then continues to monitor the price and closes the hedge order if the market reverses back into the grid. When to close the hedge is also definable of course.

autohedgeea

In the picture the AutoHedge EA (silly name I know…) monitors AUDNZD, GBPJPY, USDJPY, EURJPY and EURUSD orders made by the GridBot. It is currently hedging AUDNZD because the running profit there is worse than -100. With the cost of opening the hedge the loss is now locked in at -136 (AUDNZD has huge 20 pips of spread making it expensive to hedge). If the running profit of the GridBots orders improve to -75 EUR the hedge would be closed with this configuration.

So what does this cost? Well if the market never returns to the exit threshold the hedge order have a cost of the spread. If it does return it costs the spread and the difference between entry and exit. I feel that this value is the one that will be difficult to set. Too small we may be whipsawed into opening several hedge orders during one session (expensive with the spreads of some pairs), too big we just pay to much for the hedge, taking away profit from the GridBots orders.

Pairs with tighter spreads will be much better for this function as the hedge won’t cost as much, so I think I will primarily test it on USDJPY, EURJPY and EURUSD with Alpari UK demo. I will also open a demo with Forex.com UK.

So as I said, I don’t know that this will save money in the long run, only that it will effectively limit the huge draw downs with the GridBot. Instead of hitting that Safety net of $500 one could have been hedged at a $100 loss, with the possibility of the market to reverse and making a small profit (closing the GridBot orders with profit but  paying for the hedge).

I am thinking about hedging every order individually with a inverse order and use the OrderCloseBy() function instead in combination with the corresponding GridBot order (this saves one spread) if the market doesn’t return and the GridBot is about to close the orders (I would then jump the gun and close them say 1 minute before EndHours). But that would close the GridBot order, with the current implementation the GridBot isn’t affected at all by the hedge orders. Also I know that the  GridBot developers are working on a real hedge implementation in their EA (can’t wait for it). This is just a substitute for the Safety net feature, not a real hedged grid trading strategy. But I’ve been meaning to check out writing some MQL4 for some time, so I saw this as a opportunity. Perhaps it will evolve into a stand alone grid trading EA also, I am quite tempted to just write it all myself… :)

Oh, and yes, I have been tempted to let the hedge order be open after the GridBot closes its orders, with a gliding take-profit. If the trend is good this could make some money, but it really isn’t the whole point here, so I won’t implement it like that right now.