Profitable Hedging Lots Strategy - page 2

 

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

 

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

 

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

Files:
 

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

 

This should fix it but please double check and let me know.

Regards,

Riz

Files:
 

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

 

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.

 

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

 

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 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?

Files:
 

Surprise Coming Soon

FxFux:
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

I have found settings with this EA that will make 127k out of 10k in 2.5 years, with 4% risk on initial trade. During which process I found a few issues and bugs, First thing I added as money management hence you can see the compounding growth.

Second issue was the max lot size issue, which I have fixed by dividing the lots into multiple orders so the brokers limitation doesn't apply e.g. if max lot size the broker allows is only 50 lots and the EA wants to open 125 lots, it will simply open 2 orders of 50 lots each and one with 25 lots with same values.

The third issue is a bug in the EA which did my head in for a long time was the fact that sometimes it tries to place a stop order when it should be placing a limit order resulting in an OrderSend Error which caused equity drops during back testing. I am near to fixing it soon.

I will definitely share the EA once I have fixed all these issues and is satisfied.

Regards,

Riz

Reason: