Forex Factory (https://www.forexfactory.com/forum.php)
-   Commercial Content (https://www.forexfactory.com/forumdisplay.php?f=158)
-   -   jiva34's BB Stop auto-trader by SteveHopwood (https://www.forexfactory.com/showthread.php?t=325292)

SteveHopwood Nov 10, 2011 6:26am | Post# 1

jiva34's BB Stop auto-trader by SteveHopwood
 
3 Attachment(s)
SERIOUS WARNING

 

  1. Most Forex traders lose all their money.
  2. Using the robot posted here in trading Forex does not guarantee success.
  3. Trading this robot could lead to serious financial loss.
  4. Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  5. This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
  6. At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  7. To trade this robot, you have to understand:

    1. How to use EA's.
    2. jiva's trading method at http://www.forexfactory.com/showthre...99#post5067399


/////////////////////////////////////////////////////////////////////////
PLEASE NOTE. THERE WILL BE NO FURTHER DEVELOPMENT OF THIS EA HERE. DEVELOPMENT CONTINUES IN MY OWN FORUM.

/////////////////////////////////////////////////////////////////////////


DO NOT USE THIS EA ON A LIVE ACCOUNT. IT IS EXPERIMENTAL.


Introduction

Post 1 in jiva's thread tells you everything you need to know about the trading method. You need the attached indi in your Indicators folder; you do not need it running on your chart.

We have Khalaad to thank for this EA. He drew my attention to the thread and asked me to code the EA. Warm round of applause to Khalaad.

Huge round of applause to jiva34, who developed the trading method and shared it with us at FF.

What I have coded here is based on jiva's post 1, plus Khalaad's enhancement. As usual, I ask you not to clutter up jiva's thread with discussion about this EA; please limit this to posts here. I cordially invite to discuss the methodology freely.

Khalaad posted a brilliant enhancement to the original method; this is about taking additional trades when there is a big move in our favour. At the time, my copy of Word was not playing ball with displaying Khalid's explanation/pseudo-code, so stimpy posted it here at http://www.forexfactory.com/showthre...94#post5127294

The "Slow BB" inputs control the initial trade. "Fast BB" inputs control the secondary trades; you disable this feature by setting the value of FastLength to zero.

To regular contributors to jiva's thread who cannot post here, you will see how to have the restriction lifted at the end of this post.


Hanover
The Hanover module allows us to trade in the direction indicated by hanover's Recent Strength indi. I consider this to be the most significant development in my time at FF. Details in the Hanover thread at http://www.forexfactory.com/showthread.php?t=319709 If you use Hanover, I recommend lawgirl's ratio of 1:4 to 1:6 between your trading and higher-direction time frames. For example, if trading the M5 chart, use M30 as your Hanover time frame.


CBI module
For details about what this does, visit the Hanover thread linked in the previous paragraph.

Hanover and CBI are disabled by default.

EA inputs
You will find descriptions of many of the inputs in the attached Shell User Guide. I wrote it for issue with bots I code in the future. Where you see inputs described that you do not see in the EA's inputs list, ignore them.

For an explanation of their being two sets of BB Stop inputs, read Khalid's post at http://www.forexfactory.com/showthre...07#post5125607

The D1 open price and daily pivot price lines are drawn as a result of this post by Swg - http://www.forexfactory.com/showthre...07#post5132307 As yet, jiva does nothing with these lines; they are drawn in case you want to use them as a part of your deciding which direction to trade the market.

Thread rules
Usual stuff:

 

  1. Be polite and supportive to and of fellow contributors.
  2. Be positive. Pointlessly negative comments will result in my removing from you, the ability to post in my threads (to see what happens to those who break this rule, read what happened to the dimwit who posted moronically in a different thread: http://www.forexfactory.com/report.php?p=5126642)

  1. You may be critical. You are allowed to say, "I do not think this will work long term because...................."
  2. You are not allowed to say, "This is rubbish and anyone who trades it is an idiot."

In conclusion

Have fun. Let's see if this baby can sing.







Matters of general interest



Read this post:
http://www.forexfactory.com/showthre...11#post4923611 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration. There is a thread devoted to Sam's trading method at http://www.forexfactory.com/showthre...25#post5118825



Masterly summary of hedging: http://www.forexfactory.com/showthre...79#post4977179



EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here at FF. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthre...94#post4431794, at the bottom of the post.



Useful utilities/EA's/scripts

 

  1. MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.forexfactory.com/showthread.php?t=299017
  2. Multi purpose trade manager: http://www.forexfactory.com/showthread.php?t=89371
  3. Account equity analyser: http://www.forexfactory.com/showthre...16#post4693716 Also at http://www.forexfactory.com/showthre...98#post4709098, which includes a template for both USD and the Euro.
  4. Past-trades display indi by squalou; shows a graphical display of the success/failure of trades in your History tab. Breathtaking piece of work. http://www.forexfactory.com/showthre...10#post3830610
  5. My shell EA – the code I use to produce EA's so quickly. http://www.forexfactory.com/showthre...94#post4431794




Most promising trading EA's

 

  1. Spider. I am trading this live. http://www.forexfactory.com/showthread.php?t=313680
  2. The Beast: http://www.forexfactory.com/showthre...=1#post4135863 A number of traders are still trading this live.

_________________________________________________________________________________
Posting restrictions
I have restricted the ability to post in this thread to: traders with at least 1 voucher; and traders on my 'buddy' list. I have done this because I do not want the thread cluttered with 'newbie' questions about the basics. New/inexperienced traders, this is not intended as a direct insult. What I want here is discussion with traders who fully understand what it is they are doing; when you newbs have been around a while, you will come to understand what a difference experience makes to the posts a member writes and shudder at the recollection of some of the questions you asked. I do. http://cdn.forexfactory.com/images/s..._the_floor.gif Go to your profile page; there is a link to the FF page that describes the voucher process.

Do not attempt to get around this by sending me pm's asking for help with your basic problems. Doing so will earn you an automatic ban from all of my threads.

I have set up a partner to my restricted threads at http://www.forexfactory.com/showthre...66#post3948666
There, you can post the questions that you cannot post here, about anything you need to know. Someone with the knowledge and experience you need will answer.

Traders/coders with experience who have not yet been vouched for, can get around this restriction be being added to my 'buddy' list; all you have to do is pm me to ask me to do this.
Shell User Guide.pdf
BBands_Stop_v2_2.0.mq4
jiva's BB Stop auto-trader.mq4


Khalaad Nov 10, 2011 6:31am | Post# 2

Thank you.

Let the field day begin!

Khalid

SteveHopwood Nov 10, 2011 6:53am | Post# 3

To anyone who downloaded the EA before the time on this post, watch the CBI module thingy; I forgot to disable it.


errich fx Nov 11, 2011 12:00am | Post# 4

$100 for coding per EA, or it depends on difficulty EA code?

thanks

----
donchian channel

bobasker Nov 11, 2011 12:04am | Post# 5

Off to a great start, http://my.jetscreenshot.com/5637/201...xzee-106kb.jpg

SteveHopwood Nov 11, 2011 6:34am | Post# 6

$100 for coding per EA, or it depends on difficulty EA code?

thanks

----
donchian channel
Nope. $100 for an EA; I explain why I charge so little in the Generic post. If the EA is too hard to code, I will not attempt it.


SteveHopwood Nov 11, 2011 6:35am | Post# 7

Excellent. There are enhancements coming soon; Khalid has some successful ones he wants me to add to the code, so it should get even better. I cannot remember what they are, but they are listed in one of his posts in jiva's thread.

Khalid, maybe you could post a link to the relevant post for those who missed it, so others can think about this?


Khalaad Nov 11, 2011 10:12am | Post# 8

1 Attachment(s)
Excellent. There are enhancements coming soon; Khalid has some successful ones he wants me to add to the code, so it should get even better. I cannot remember what they are, but they are listed in one of his posts in jiva's thread.

Khalid, maybe you could post a link to the relevant post for those who missed it, so others can think about this?

Thank you, Steve. Sorry, I was away and took rather long time in responding.

As is this EA is going great guns. However, here are the suggestions:

TRIGGERS

Calculate Length 15, Deviation 1.5, Money Risk 1 for BBands_1.5
Also calculate Length 20, Deviation 2.0, Money Risk 1 for BBands_2

ENTRIES and EXITS

1. Go LONG half position when bar close crosses over and closes above BBands_2
2. If still LONG add quarter position if subsequently bar close crosses over and closes above BBands_1.5
3. If still LONG add another quarter position if subsequently there is another bar close crosses over and closes above BBands_1.5
4. Now we have full position, do not add any more LONG
5. Close the FULL POSITION when bar close crosses under and closes below BBands_2
6. Continue with SHORT in accordance with 1 to 5 above.

EXTRA

The EA should have the ability to know if LONG, SHORT, or FLAT by checking for, and retrieve, existing order info before initiating any order in case MT4 or your computer crashes, or a position is closed manually.
The EA should also have the ability -- I think this one is standard in Steveís ESís Ė to either trade LONG or SHORT, in which case a SHORT signal will close the LONG but not establish a SHORT trade, and a LONG signal will close the SHORT but not establish a LONG trade.

In the picture below Blue and Red are BBands_2, SkyBlue and Tomato are BBand_1.5

Khalid
Click to Enlarge

Name: bbands_2d and 1.5d.gif
Size: 55 KB

bobasker Nov 11, 2011 5:18pm | Post# 9

After two days of trading OOTB.

http://my.jetscreenshot.com/5637/201...inlp-113kb.jpg

bobasker Nov 11, 2011 5:25pm | Post# 10

Here's the chart screen shot,

http://my.jetscreenshot.com/5637/20111111-pjg9-93kb.jpg

SteveHopwood Nov 11, 2011 7:41pm | Post# 11

Thank you, Steve. Sorry, I was away and took rather long time in responding.

As is this EA is going great guns. However, here are the suggestions:

TRIGGERS

Calculate Length 15, Deviation 1.5, Money Risk 1 for BBands_1.5
Also calculate Length 20, Deviation 2.0, Money Risk 1 for BBands_2...
Khalid, your chart covers too much ground here. I think I see what you are getting at, but could you please zoom in on your chart and post an 'I took my first half-position here', and 'I added my next quarter to the position here' and 'here is where I took my final quarter' arrows and text to your charts?

This is looking exciting. We can all see those occasional runs where the market crosses the BB stop and keeps on going. It looks as though you have the method to take advantage once I understand it.

Cheers


tex Nov 11, 2011 8:02pm | Post# 12

nice results bob. do u trade e/u 5m only ? dont u trade other pairs and tf ?




bobasker Nov 11, 2011 9:29pm | Post# 13

nice results bob. do u trade e/u 5m only ? dont u trade other pairs and tf ?
I do trade other pairs and time frames but for EA testing I only test on EU.

Khalaad Nov 11, 2011 10:32pm | Post# 14

3 Attachment(s)
Khalid, your chart covers too much ground here. I think I see what you are getting at, but could you please zoom in on your chart and post an 'I took my first half-position here', and 'I added my next quarter to the position here' and 'here is where I took my final quarter' arrows and text to your charts?

This is looking exciting. We can all see those occasional runs where the market crosses the BB stop and keeps on going. It looks as though you have the method to take advantage once I understand it.

Cheers

Steve,

Please forgive my partial explanations.

Yes, this is about (attempting to) gain an edge by trading more lots when one is winning.

Attached are:

  1. EURUSD; and
  2. USDCAD;

charts illustrating the rules. Blue and Red are BBands_2, SkyBlue and Tomato are BBand_1.5

Also attached is a entries and exit logic pseudo code.

Khalid
Click to Enlarge

Name: eurusd.gif
Size: 29 KB
Click to Enlarge

Name: usdcad.gif
Size: 23 KB
BBands_pseudo code.doc


Khalaad Nov 11, 2011 11:57pm | Post# 15

Give thanks to jiva34 AND Steve.

Khalid

SteveHopwood Nov 12, 2011 4:39am | Post# 16

Steve,

Please forgive my partial explanations.

Yes, this is about (attempting to) gain an edge by trading more lots when one is winning.

Attached are:

  1. EURUSD; and
  2. USDCAD;

charts illustrating the rules. Blue and Red are BBands_2, SkyBlue and Tomato are BBand_1.5

Also attached is a entries and exit logic pseudo code.

Khalid

Khalid, that is breathtaking. I had been considering adding my usual mptm features to the bot to take advantage of those runs, but this is much better.

Guys, can one of you who has downloaded the pseudo-code do me a favour, please. For some reason, Word is going on strike when I try to download the doc. Could one of you re-save it in OpenOffice format and post it here, please?

Once the logic is in place, the code almost writes itself, so to have this presented to me on a plate is a boon.

Cheers


stimpy Nov 12, 2011 4:45am | Post# 17

Steve,

cannot upload odt


Inputs:
Length1(15),
Deviation1(1.5),
Length2(20),
Deviation2(2),
HalfLots(0.02),
QuarterLots(0.01);


Maximum 3 entries allowed LONG or SHORT.


UpperBBand_1 = BollingerBand(Close, Length1, Deviation1);
LowerBBand_1 = BollingerBand(Close, Length1, -Deviation1);

UpperBBand_2 = BollingerBand(Close, Length2, Deviation2);
LowerBBand_2 = BollingerBand(Close, Length2, -Deviation2);

//Entries

If marketposition is FLAT or SHORT and Close crosses over UpperBBand_2 and stays above it at bar close then OP_BUY HalfLots this bar at Close;

If marketposition is FLAT or LONG and Close crosses under LowerBBand_2 and stays blow it at bar close then OP_SELL HalfLots this bar at Close;

If marketposition is LONG and Close crosses over UpperBBand_1 and stays above it at bar close then OP_BUY QuarterLots this
bar at Close;

If marketposition SHORT and Close crosses under LowerBBand_1
and stays blow it at bar close then OP_SELL QuarterLots this
bar at Close;

//Exits

If marketposition is LONG and Close crosses under LowerBBand_2 and stays blow it at bar close then CLOSE ALL LONGS this bar at Close;

If marketposition is SHORT and Close crosses over UpperBBand_2 and stays above it at bar close then CLOSE ALL SHORTS this bar at Close;



and didnt know you were a doctor as well.

Inserted Video

SteveHopwood Nov 12, 2011 6:13am | Post# 18

Steve,

cannot upload odt


Inputs:
Length1(15),
Deviation1(1.5),
Length2(20),
Deviation2(2),
HalfLots(0.02),
QuarterLots(0.01);


Maximum 3 entries allowed LONG or SHORT.


UpperBBand_1 = BollingerBand(Close, Length1, Deviation1);
LowerBBand_1 = BollingerBand(Close, Length1, -Deviation1);

UpperBBand_2 = BollingerBand(Close, Length2, Deviation2);
LowerBBand_2 = BollingerBand(Close, Length2, -Deviation2);

//Entries

If marketposition is FLAT or SHORT and Close crosses over UpperBBand_2 and stays above it at bar...
Fabulous stimpy. Cheers.


SteveHopwood Nov 12, 2011 2:06pm | Post# 19

1 Attachment(s)
Latest update in post 1, folks, incorporating Khalid's enhancements, listed in his doc or printed by stimpy here http://www.forexfactory.com/showthre...94#post5127294

Could someone run a visual backtest over, say, the last couple of weeks and check that the bot is sending the QuarterLot trades appropriately, and closing the entire position? If you have the attached template in your MT4 platform/Templates folder, Strategy Tester should load the indi's for you automatically. An Open Prices backtest is all you need - no need for the Every Tick stuff.


jiva's bb stop auto-trader.tpl

bobasker Nov 12, 2011 5:15pm | Post# 20

Here's a very quick test,

http://my.jetscreenshot.com/5637/201...md3p-110kb.jpg


© Forex Factory