Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 07-29-2009, 02:08 PM
Junior Member
 
Join Date: Oct 2008
Posts: 1
mperry is on a distinguished road
Account for the spread

Hi FxFux,

You have presented an interesting concept - thank you.

In giving it some thought on the EUR/USD tonight (AEST time), I noticed that in my particular test case I was long from 1.4166. The price dropped to Sell 1 @1.4106 where the SL was triggered, but the price failed to drop enough to cover the spread to reach my buy stop (Buy 3 @1.4106). This meant that the stop loss was triggered - play money gone, but I was not in the 'recovery trade' because of the spread.

I dont know if this makes sense??? I guess it was very unlucky that the price turned right at that point, but still a real possibility.

Anyway, I'll keep playing with it - thanks again.

Cheers,
mperry
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #12 (permalink)  
Old 07-29-2009, 05:00 PM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
recoding

hi mperry,

that is exactly the fact why my friend syedrizwan is reprogamming the ea .. I'm very grateful that he is around here in this thread because my coding skills are really horrible.. so let's wait a little and then test it.. what are your settings for sl, tp and stopDistance?

best regards
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #13 (permalink)  
Old 07-29-2009, 09:58 PM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
money management

hey syedrizwan,

is there a kind of money management code built in the ea? now after account rising up it opens always two buy/sell 0.01 orders simultaneous?!? can you have a look please?

kind regards
chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #14 (permalink)  
Old 07-30-2009, 03:11 AM
Junior Member
 
Join Date: Mar 2009
Posts: 26
syedrizwan is on a distinguished road
Modified EA

Please find the EA modified according to the request. This modification doesn't contain close all orders request and it won't be unless I am able to understand fully what it meant.

For money management I tried to run a version at home with Risk parameter in it but it didnt go too far with it as crazy as it may sound but you could only successfully run it with 0.0125% risk to run otherwise it will end up blowing your account. We need to understand that with every lot size increase we are asking ourselves to be able to handle ((3^n)*InitialLotsize) where n is the number of orders opened

Regards,
Riz
Attached Files
File Type: mq4 Paulo_Costa_Hedge.mq4 (12.4 KB, 43 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #15 (permalink)  
Old 07-30-2009, 09:42 PM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
Cool problem

heyhey riz,

wow thanks for your work.. I tested the ea the whole day on demo alpari demo account.. so far so good it's seems to me that there is a little problem:

my settings: 0.01 lots with stopDistance 15, TP 15 and SL 30 pips Spread 1.6

ea opens buy 0.01 @ 1.40862 S/L 1.40562 T/P 1.40996,
then sell 0.03 @ 1.40712 S/L 1.41012 T/P 1.40578,
and stop buy 0.06 @ 1.40862 S/L 1.40562 T/P 1.41028

I think red T/P has to be 1.40996 and NOT 1.41028, maybe you can have a look at this.. and why opens the ea sometimes double orders? for example right now I have two stop buy 0.96 open simultaneously?

greetz
chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #16 (permalink)  
Old 07-31-2009, 02:15 PM
Junior Member
 
Join Date: Mar 2009
Posts: 26
syedrizwan is on a distinguished road
This should fix it but please double check and let me know.

Regards,
Riz
Attached Files
File Type: mq4 Paulo_Costa_Hedge.mq4 (13.0 KB, 60 views)

Last edited by syedrizwan; 07-31-2009 at 03:07 PM. Reason: Update source code
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #17 (permalink)  
Old 07-31-2009, 06:06 PM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
Now it works

Great WORK RIZ,

now it works perfectly thanks so much.. but now I have another problem.. I want to change broker.. from alpari to nordmarkets.. because alpari allows only 2 lots maximum with a micro account.. and with a classic account minimum lot size is 0.1 to trade.. I need 0.01 lots and so nordmarkets is a good choice I think.. Another advantage is they have only 1 pip spread on eur/usd ..
so I have to open a mini trading account there but now a big problem: on their mini account they trade with mini-lots, so 1 lot on this account is 0.1 (10000) and 0.1 is 0.01 micro lots (1000), the ea gives me error-code: 130 and 131..

can you help please? i hope you understand my problem you know my poor english...

greetz
chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #18 (permalink)  
Old 08-01-2009, 04:04 PM
Member
 
Join Date: Jul 2006
Location: Denver, Colorado
Posts: 51
AirforceMook is on a distinguished road
Just in case anyone is curious, this is simply a Martingale system.

Martingale theory states you simply double the bet each time you're wrong. Eventually, if you have enough money to cover the current losses, you'll always end in profit. The problem is that lot sizes will inevitably increase dramatically and blow most accounts.

I still think there's a way to make this a winning system, though.
__________________
//AirforceMook//
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #19 (permalink)  
Old 08-02-2009, 02:03 AM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
Wink martingale

hey ya airforce man ,
I trade this system with 0.01 lots with great success on eur/usd.. yes it's martingale (0.01, 0.03, 0.06, 0.12, 0.24 and so on), but the key to make this a great winning system is to trade the right time.. beginning london session, london/new york overlapping and through news it works great.. maybe we can build in a kind of trending indicator like ATR f.e. if ATR> x trade otherwise don't trade (just a thought).. maybe you're so kind helping us in developing the ultimate ea suggestions are very welcome nice sunday man

greetz
Chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #20 (permalink)  
Old 08-02-2009, 07:04 AM
Member
 
Join Date: Jul 2006
Location: Denver, Colorado
Posts: 51
AirforceMook is on a distinguished road
Cool

I'd love to help develop a successful system. I've been messing around with these for some time and never quite mastered it. I still think the concept is absolutely phenomenal, albeit with one major hurdle to overcome before profitability will be hit.

Every martingale system (that I've made, at least) is wildly successful right up until the price begins whipsawing back n' forth and the EA bets far too much, blowing the account. I've tried eliminating all trades at a set loss, etc, but they occur far too often to end up profitable in the end. That is, after all, the point of the martingale system. You'll have massive drawdown only to recover with even larger profits.

Because of this, I'm convinced the only road to a good EA is one that times its reversals well. The fewer reversals needed to recoup the losses, the better.

I think there's two ways to do this, but both are simply trying to identify the exact "tipping point" (peaks and troughs) in the price. This is where you want your reversals to be, otherwise you'll have too many open trades and your free margin will get blown to hell.

Try to directly identify the turns.
I tried looking back and detecting a peak that's larger than the past <X> number of bars. The problem is that when you encounter a large uptrend, it will think just about every bar is a new peak. This results in you betting against the trend the whole way up.

A slightly better method was to detect bars that were in opposition to the current trend. These usually occur at the end of a large movement and are often peaks. Unfortunately, depending on trend detection & other factors, this can result in a lot of false-positives.

Use a lagging indicator that will only move on large turns
MA's are a good example of this. If you watch the slope of the line it will generally stay positive the whole way up until it has reached the top and the trend has turned. The problem is that you reverse far too late to be effective.

I've attached an example pic of a lagging indicator I've been using. It's just a step MA. If the price is currently above both bars, it will stay long. (Reverse for short) You'll notice it still results in a lot of reversals. (4 times there at the end)

=====

I've also noticed that using larger lots with smaller takeprofits tends to work better. My profitability is above 70% on average. This means that the first trade will usually close profitably. If I decrease the lots or increase the TP points this goes down.

I'm also considering the idea of having a swarm of these on different currencies working together. If one currency begins to overwhelm itself, and the rest are able to help (ie they have profit), close ALL trades to minimize the damage. I have yet to code this at all. It unfortunately cannot be backtested, either.

=====

Any thoughts folks?
Attached Images
File Type: gif eurusd_m5_stepma.gif (20.2 KB, 166 views)
__________________
//AirforceMook//
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A profitable Scalping strategy Cyclesurfer Suggestions for Trading Systems 58 05-30-2009 05:33 AM
Low risk Hedging strategy jgerousis Suggestions for Trading Systems 2 03-01-2007 08:33 PM
Please HELP! HELP! HELP! for my very simple and profitable strategy Michel Metatrader 4 9 12-01-2006 06:33 AM
very profitable backe test for this strategy harold4x Suggestions for Trading Systems 5 03-14-2006 04:34 PM


All times are GMT. The time now is 07:54 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.