• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 6:58am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 6:58am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Martingale, Reverse Martingale, Modified Martingale, Maths 1 reply

SWB Stealth (Martingale) 95 replies

SWB Martingale EA (with best setting) 63 replies

Martingale vs. Non Martingale (Simplified RoR vs Profit) 1 reply

SWB Super Trend 77 replies

  • Trading Systems
  • /
  • Reply to Thread
  • Subscribe
  • 178
Attachments: SWB Martingale EA
Exit Attachments

SWB Martingale EA

  • Last Post
  •  
  • 1 1112Page 131415 52
  • 1 12Page 1314 52
  •  
  • Post #241
  • Quote
  • Jun 17, 2010 12:35am Jun 17, 2010 12:35am
  •  ecTrade
  • | Joined Jul 2009 | Status: Member | 1,163 Posts
Quoting Beshakey
Disliked
Quote
Disliked
Shirt protection, what's that?
I think he means the equivilant of your global kill switch. It means an emergency stop to close all orders and keep you from "losing your shirt". Probably a Hopwood term.
Ignored
Hey, thanks.

Quote
Disliked
Has anyone thought about opening on 3 or 4 pairs at the same time, not too closely correlated, of course, and closing all trades at once when there is acceptable profit over loss? You would be accepting a lot of losers too early and leaving some money on the table. But, should be able to get an overall steady profit.
This is the same as the closeall_target_price in version 9.1. Of course it's been awhile since I've even looked at it, so I can't be certain that it works. It seemed like it was at the time though.
Attached File
File Type: mq4 swb grid 4.1.0.9.1.mq4   25 KB | 753 downloads
 
 
  • Post #242
  • Quote
  • Jun 17, 2010 7:16am Jun 17, 2010 7:16am
  •  Beshakey
  • | Joined Apr 2009 | Status: Member | 251 Posts
Thanks, ec, I will give it a look see.

I have been trading live with the original version on my little account I use for experimenting

Lot 0.01 up to 5 levels multiplication of 2. all other set default (I think). Have been keeping an eye on it in my spare time. Made about 3% on the account balance on this last week. Maybe 1% so far on this week. At 5 levels, on an account this small, will probably blow it sooner or later.

Have been turning off the EA when retrace looks to be strong, and manageing manually from there: closing when happy with profit.

One thought I had was... Let's say you reached level 5. The retrace in in, and now level five is in profit. Later, when level 4 is reached and now it is in profit, set all trades stop losses to the entry of level 5. When Level 3 turns to profit, move the stops again to the level 4 entrance, and so on. Let it roll out and see how far it goes.

Haven't tried it, and doubt it is an original idea. Probably have a lot of small losses or break evens, but once in a while, would probably score a huge one.

Probably a flaw in my thinking.

Shakey
 
 
  • Post #243
  • Quote
  • Jun 17, 2010 7:18am Jun 17, 2010 7:18am
  •  carolco
  • | Joined Jan 2010 | Status: Member | 178 Posts
Quoting ecTrade
Disliked
Hey, thanks.

This is the same as the closeall_target_price in version 9.1. Of course it's been awhile since I've even looked at it, so I can't be certain that it works. It seemed like it was at the time though.
Ignored
Im playing with this system for a while and let it run on IBFX demo account for a week with 1000 USD deposit on all pairs that have less than 8 pips spread. I have 22 pairs setup and Im up 200 USD which is 20% in a week. This is quite impressive but there is no plan how to get out of bad trade which can easily whip out your account with all profits in a day or two.

Im trading all dangerous pairs with the system. One option is to set global kill to 50USD. But I think SL in martingale based system is not good solution.
The hedge seems to be good idea but according my backtest with AUDUSD where it went 15 levels without a retrace (august 2002) hedge seems to be only an option that holds you in a trade a bit longer but it is not a solution.

Still learning a testing...
 
 
  • Post #244
  • Quote
  • Jun 17, 2010 7:30am Jun 17, 2010 7:30am
  •  Beshakey
  • | Joined Apr 2009 | Status: Member | 251 Posts
Quoting carolco
Disliked
Im playing with this system for a while and let it run on IBFX demo account for a week with 1000 USD deposit on all pairs that have less than 8 pips spread. I have 22 pairs setup and Im up 200 USD which is 20% in a week. This is quite impressive but there is no plan how to get out of bad trade which can easily whip out your account with all profits in a day or two.

Im trading all dangerous pairs with the system. One option is to set global kill to 50USD. But I think SL in martingale based system is not good solution.
The hedge seems to be good...
Ignored
Had similar results on IBFX backtest. $500 balance and tended to double balance about every 6 months on the EU. the AU seems to work very smooth as well. Yen crosses tend to crash it at some point.

Shakey
 
 
  • Post #245
  • Quote
  • Jun 17, 2010 8:04am Jun 17, 2010 8:04am
  •  paulbt38
  • | Joined Mar 2010 | Status: Member | 244 Posts
Surely another way to help reduce losses would be to close each losing trade as the next one opens. So for instance we start with a buy with lot size 0.01 (or 0.1 if this is your starting point). If the market moves against us and we open a level two trade at 0.02, then close the level one trade. If it still moves against us open level three at 0.04 and close level two. This combines with the hedge function should help.

I have tested this over many weeks trying to get the right setup. I have been getting smoother results with an rsi period of 30, however since 2007 there is still an occasional blow out on some pairs.

I have no coding experience but imagine the above shouldn't prevent much difficulty to some of the superb talent on ff

Paul
 
 
  • Post #246
  • Quote
  • Jun 17, 2010 9:34am Jun 17, 2010 9:34am
  •  MrOptions
  • | Joined Jun 2010 | Status: Member | 7 Posts
PHP Code:
Quote:Then if the lot_multiplier_2 is set to 1.5, it should multiply that hedge amount by 1.5 when the next level is hit. Actually this is a separate function entirely (requested by Raph19) and has nothing to do with the hedge. Please see this post. 
So this is why my trades went from .1 to .2 to .3 (instead of .4) to .5 to .8 ? If I just want to keep doubling I should set lot_multiplier_2 at 2 or lot_multi_2_level at 100 or more ?


PHP Code:
Quote:How do you decide when the next level of hedge gets traded? What is h_tp_factor? The h_tp_factor is a percentage of the range, that specifies TP value. So, if it is set to 1 (default), it means 100% of whatever you set the range. If you set it to 2, that means 200%, if you set it to 0.5, that's 50%, etc. 

So at the default of 100%, if the range is 25, then every 25 pips the hedge will take it's profit and open a new trade when the next level of regular martingale trade gets executed ? If I want the hedge to remain open and double up I could set the h_tp_factor at 200 so I can get two levels of hedge simultaneously (or 300 for 3 levels, 400 for 4 levels, etc.)?
Attached Image (click to enlarge)
Click to Enlarge

Name: swb.jpg
Size: 232 KB
 
 
  • Post #247
  • Quote
  • Jun 17, 2010 11:37am Jun 17, 2010 11:37am
  •  ecTrade
  • | Joined Jul 2009 | Status: Member | 1,163 Posts
Quoting MrOptions
Disliked
So this is why my trades went from .1 to .2 to .3 (instead of .4) to .5 to .8 ?
Ignored
Yes.

Quote
Disliked
If I just want to keep doubling I should set lot_multiplier_2 at 2 or lot_multi_2_level at 100 or more ?
Yes, I believe it should work either way. Also, if you set lot_multiplier_2 to 0, it will disable it, and effectively does the same thing.


Quote
Disliked
So at the default of 100%, if the range is 25, then every 25 pips the hedge will take it's profit and open a new trade when the next level of regular martingale trade gets executed ?
Yes.

Quote
Disliked
If I want the hedge to remain open and double up I could set the h_tp_factor at 200 so I can get two levels of hedge simultaneously (or 300 for 3 levels, 400 for 4 levels, etc.)?
Actually, it holds the original hedge value (lot size) and effectively doubles, triples and quadruples the range size. And, now that I think about it, it's kind of pointless, because all you're doing is re-specifying the range with the hedge set at 100%. Originally I tried setting it up so you could close the hedge out early but, this is what it wound up doing.
 
 
  • Post #248
  • Quote
  • Jun 17, 2010 12:11pm Jun 17, 2010 12:11pm
  •  jebng
  • | Joined Feb 2009 | Status: Member | 9 Posts
ECtrade,

1) EA did not open sell at level 3
2) EA did not open buy at 6th level.

thks.
Attached Image (click to enlarge)
Click to Enlarge

Name: swbhedge.jpg
Size: 180 KB
 
 
  • Post #249
  • Quote
  • Jun 17, 2010 6:04pm Jun 17, 2010 6:04pm
  •  richmeup
  • | Joined Sep 2009 | Status: Member | 10 Posts
Quoting paulbt38
Disliked
Surely another way to help reduce losses would be to close each losing trade as the next one opens....
Ignored
I think this is a great idea for Martingale system.
Thanks...
Any coder willing to apply this idea to next SWB version?
Trading for living is not a dream.
 
 
  • Post #250
  • Quote
  • Jun 19, 2010 6:55am Jun 19, 2010 6:55am
  •  carolco
  • | Joined Jan 2010 | Status: Member | 178 Posts
Quoting paulbt38
Disliked
Surely another way to help reduce losses would be to close each losing trade as the next one opens....
Ignored
Sorry but its not a good idea. Its all about PROBABILITY.This way has an advantige to have minimum drawdown and dramaticaly less need of margin. But on the other side you will need to have significantly more positive pips to reach the TP than with the "hold trades martingale". So You increase the pobability of a need to have more levels to get Your TP.

F.E. by original SWB to reach 0.5 USD TP (default with cents 0.01)
from L2 Youll need only 25 pips retrace (the price goes back to L1 where L1 is @ 0 and L2 has 25 pips x 0.02lots =50cents)

With Your Idea on L2 im already -25cents (L1 hit SL) and then I will need reatrace from L2 with 37.5 pips to get 50cents profit (37.5 x 0.02lots = 0.75-0.25=0.50)
Probability here to get a bad trade is increased with this system..

And definitely this is NOT a solution how to avoid or get out of a bad trade..
---------------------------------------------------
What Im thinking about is some kind of Time filter which closes trade before important news.. But I think this would not help 100%.

So my solution right now (which will forward test for 3 monts) is to trade as many pairs as possible (idealy with less than 5pips spread), with as many trades as possibile (1m time frame with Stoch turned OFF) and have a global kill swith for each pair separately set to 45 USD (or few pips before L7 point) , and one global kill switch set @ 80USD youll need to have well funded account (at least 4000USD). Then Youll pray to the following events:
-the kill swith will trigger max once a week..
-News wont hurt you by triggering kill swith..
-Platform must not die (unexpected error)
-Connection must not fail (Youll need solid internet access)
-As youll start gain 100 USD a week Broker can harm you by disconeting your account from your platform. Youll never find out if it was an accident or their purpose..

I think I would sleep much worse with this "Fear Factors"

I have learned from a very wise man named NanningBob two things:
-If price goes Up must go down and vice versa (this is good for SWB)
-before Im going to open a trade I have a perfect plan for every event that may happend during a trade.

Im sorry but with SWB I have not solution how to avoid or get out of a bad trade.. Thats why I cant trade it live at least for now...
 
 
  • Post #251
  • Quote
  • Jun 19, 2010 9:34am Jun 19, 2010 9:34am
  •  paulbt38
  • | Joined Mar 2010 | Status: Member | 244 Posts
Quoting carolco
Disliked
Sorry but its not a good idea. Its all about PROBABILITY.This way has an advantige to have minimum drawdown and dramaticaly less need of margin. But on the other side you will need to have significantly more positive pips to reach the TP than with the "hold trades martingale". So You increase the pobability of a need to have more levels to get Your TP.

F.E. by original SWB to reach 0.5 USD TP (default with cents 0.01)
from L2 Youll need only 25 pips retrace (the price goes back to L1 where L1 is @...
Ignored
Carolco

Fair point. But as you mention it would reduce the potential for a margin call. If we then just accept that there will be less profit for a trade that goes past level 1 then it could still work. ie still close level two trade at 25 pips. In your example it would then simply give 25 cents profit instead of 50. I am only thinking along these lines as no matter what backtests I have done there is always at least obe big blowup. I have seen on backtests that trading 0.01 lots it may work for two years but then suddenly wipeout entire bank. I understand that you culd cream of the profit each year but you would still end up losing. Running any sort of martingale system requires balls as you can get cleaned out very easily very quickly so unless you are sitting in front of computer 24 hours a day you need to build some sort of protection. Your idea sounds fine about multiple currencies but I don't know if 3 months is a long enough test.

Good luck

Paul
 
 
  • Post #252
  • Quote
  • Jun 20, 2010 6:32pm Jun 20, 2010 6:32pm
  •  carolco
  • | Joined Jan 2010 | Status: Member | 178 Posts
Yes! Exactly! I think the point is to double the account as soon as possibile. By reducing gain by 1/2 youll double time to reach 100% of your Deposit.. So if I will have a 100 a week (I definitely would not hold trades during Weekend due gaps which may cause disaster) with 1000USD deposit I will need 10 weeks of praying or proper global SL set..

There is no time period to test martingale. You can start right now. Youll never know when the bad trade comes, so it doesnt matter how long youll test. What does matter by testing is to verify your average daily income and facing potencial problems that may come (bad trade, platform crash etc.) and youll find out an optimal global SL protection. I noticed from backtests that a bad trade often comes during summer holidays mostly in range between 15th July to 15th September on some currencies..But it may happend any time. My idea would be turn off SWB in that time period..

Anyway im still not convinced about reliabilty of martingale. It will help you if you know how to reduce risk (f.e. trading 3 Levels only), but it can also kill You, so my forwardtests are helping me to find out proper settings and mainly if it is worth trading live..
 
 
  • Post #253
  • Quote
  • Jun 22, 2010 6:26am Jun 22, 2010 6:26am
  •  pipcruiser
  • | Joined Mar 2007 | Status: One life - live it... | 542 Posts
Trading with the 200 SMA 1 HR trend for 15 days, avg. 3.5% per day

http://www.mt4i.com/users/migdemo/stats

no hedge etc, old version....

BR

PC
Less is more...
 
 
  • Post #254
  • Quote
  • Jun 22, 2010 2:06pm Jun 22, 2010 2:06pm
  •  ewinner
  • | Joined Apr 2010 | Status: Hanging in there... | 216 Posts
Quoting pipcruiser
Disliked
Trading with the 200 SMA 1 HR trend for 15 days, avg. 3.5% per day

http://www.mt4i.com/users/migdemo/stats

no hedge etc, old version....

BR

PC
Ignored
Hi Pipcruiser,

Are you using the 200SMA visually? or have you coded it in?

Regards
Mark
 
 
  • Post #255
  • Quote
  • Jun 23, 2010 8:13pm Jun 23, 2010 8:13pm
  •  MrOptions
  • | Joined Jun 2010 | Status: Member | 7 Posts
I went out 9 levels on the USD/CAD. The hedge came on so it seemed to allow buy me a few extra levels. Just curious though......as the USD/CAD was going up it kept doubling up my sell. Then when the hedge came on it would give me a red "take profit" line. When that line got hit it would take the profit. Shouldnt it leave that hedge on and then place a second bigger hedge if the original trade was still doubling every 25 pips.

In other words.......there is only one hedge trade at any given time. It doesn't add on trades so there are two or more hedge trades.

Another issue...... why doesn't a red take profit line show up with the initial trade. The hedge trade generates a red take profit line. I never know where the original trade has to retrace to in order for the batch to close.

So anyway, I went 9 levels on the USD/CAD and was really sweating it (only on demo though) On a $100,000 demo it drew down to about $80,000. It then turned around and the account was as high as $110,000. When is this thing supposed to close out and take profits. I don't like having 25.60 lots + 12.80 + 6.4+ 3.2 + etc, etc...... Shouldn't this thing have taken its profits and closed everything out. I went from $100,000 to about $80,000 to about $110,000 and now I'm sitting at $104,000. If it weren't a demo I would have closed it out manually by now.
 
 
  • Post #256
  • Quote
  • Edited Jun 24, 2010 4:49am Jun 23, 2010 8:43pm | Edited Jun 24, 2010 4:49am
  •  ecTrade
  • | Joined Jul 2009 | Status: Member | 1,163 Posts
Quoting MrOptions
Disliked
In other words.......there is only one hedge trade at any given time. It doesn't add on trades so there are two or more hedge trades.
Ignored
Yes, that is correct, although I believe this is what Raph19 specified. I could be mistaken though.

And yes, if you made the hedge progressive as you suggest, it should help to extend the trading to the next level. Although you'll have to go that much further (probably not much further) in order to catch the retrace. Regardless it's probably worth a look, and probably won't require much to upgrade. I might take a look in the next day or two.

Quote
Disliked
Another issue...... why doesn't a red take profit line show up with the initial trade. The hedge trade generates a red take profit line. I never know where the original trade has to retrace to in order for the batch to close.
No, that doesn't make any sense. Although it could actually be there if you have set the tp_in_money value too high. In which case you won't see it unless you zoom out on the screen.
 
 
  • Post #257
  • Quote
  • Jun 23, 2010 9:04pm Jun 23, 2010 9:04pm
  •  ecTrade
  • | Joined Jul 2009 | Status: Member | 1,163 Posts
Quoting ecTrade
Disliked
No, that doesn't make any sense. Although it could actually be there if you have set the tp_in_money value too high. In which case you won't see it unless you zoom out on the screen.
Ignored
Oh, on this particular version (03_h, which is closest to the original), the close-out price is averaged out and doesn't set the TP values. You will have to go with version 06 if you want it to do this, although it's not setup to hedge.
 
 
  • Post #258
  • Quote
  • Jun 24, 2010 6:44am Jun 24, 2010 6:44am
  •  pipcruiser
  • | Joined Mar 2007 | Status: One life - live it... | 542 Posts
Hey

I sue it visually so its not 100% accurate, but I try to update the settings every midnight...

BR

PC


Quoting ewinner
Disliked
Hi Pipcruiser,

Are you using the 200SMA visually? or have you coded it in?

Regards
Mark
Ignored
Less is more...
 
 
  • Post #259
  • Quote
  • Jun 24, 2010 8:55am Jun 24, 2010 8:55am
  •  MrOptions
  • | Joined Jun 2010 | Status: Member | 7 Posts
So my demo account goes from $100,000 and with 9 levels of USD/CAD it goes down to about $80,000. Then there's a retrace and the account actually went as high as $110,000. But it never closed out. And I just woke up and I'm back at about $74,000. My tp_in_money is set at the default of 5.

Anybody know why I never took the profit and closed out? I do have other charts trading but they were only trading a few levels deep. And they shouldn't have any bearing on other charts, right? They're all independent I assume.

Because of that red TP line not appearing I didn't know where it was supposed to retrace to. Isn't it suppose to close everything out on any given pair when that pair show a profit of 5 (based on the default settings)?

Any advice would be MUCHO appreciated.
Attached Image (click to enlarge)
Click to Enlarge

Name: swb.jpg
Size: 191 KB
 
 
  • Post #260
  • Quote
  • Jun 24, 2010 9:46am Jun 24, 2010 9:46am
  •  ecTrade
  • | Joined Jul 2009 | Status: Member | 1,163 Posts
Quoting MrOptions
Disliked
And they shouldn't have any bearing on other charts, right? They're all independent I assume.
Ignored
That I'm not sure about. It has to be designed in. If not, and the close out price is based upon the Account Equity, you're liable to get faulty readings, which might explain why you're having problems.

Oh, it's a pain-in-the-ass trying to design it in. At least it was for me, when working on a similar EA.
 
 
  • Trading Systems
  • /
  • SWB Martingale EA
  • Reply to Thread
    • 1 1112Page 131415 52
    • 1 12Page 1314 52
0 traders viewing now
  • More
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022