BAS

User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

BAS

Post by SteveHopwood »

SteveHopwood » Tue Dec 08, 2015 4:58 pm wrote:SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • 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.
  • 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.
  • To trade this robot, you have to understand:
    • How to use EA's.
MAKE SURE YOU READ THIS POST http://www.stevehopwoodforex.com/phpBB3 ... 41#p111241 There was a Forex bloodbath on Jan 15th 2015 that you need to know about.

I have no idea whether this EA can be successful or not. It is a speculative novelty inspired by Ludo's post at http://www.stevehopwoodforex.com/phpBB3 ... 98#p132998 and my rewriting of the indi. Plus I was bored, which helps me think about other possibilities.

The rewritten indi is attached. You do not need it. BAS does not need it as the calculation code is a part of his code. BAS is short for Buyers And Sellers; his buying or selling strength comes from the original indicator. The indi uses calls to some standard indi's that come with Empty4 - Bulls, Bears and Volumes.

The indi, and so BAS, calculates the power of buyers and sellers thus:
  • Buyers = (Bulls * Volatility) / (Bulls + Bears).
  • Sellers = (Bears * Volatility) / (Bulls + Bears).
  • if Buyers > Sellers, then the strength of Buyers over Sellers is (Buyers / Sellers).
  • if Sellers > Buyers, then the strength of Sellers over Buyers is (Sellers / Buyers).
Nothing earth-shattering about all that.

BAS has three time frames: the usual TradingTimeFrame, then TimeFrame2 and TimeFrame3. TradingTimeFrame is the trigger. TimeFrame2 and TimeFrame3 are intended as higher time frames and merely have to be lining up.

Trading conditions:
  • Buy trade:
    • TimeFrame2 and TimeFrame3 must have buyers in the ascendancy.
    • TradingTimeFrame must have buyers in the ascendancy and they must be gaining strength.
  • Sell trade:
    • TimeFrame2 and TimeFrame3 must have sellers in the ascendancy.
    • TradingTimeFrame must have sellers in the ascendancy and they must be gaining strength.
BAS works with data from the close of the previous candle. You will see on the chart the buyers, sellers and power display for the previous two candles, to check that BAS is working as intended.

MinimumPowerForTrading tells BAS not to trade if the power reading for the trading candle is less than this figure. The default of 5 is guesswork.

BAS will take a trade at the open of each candle where there is a trade signal, up to MaxTradesAllowed - default 8.

ScaleOutWhenPowerDrops tells BAS to close the latest trade when the TradingTimeFrame power falls. For example, you have three buys open and the power drops for a candle, trade 3 is closed. It the Buyers start to regain strength on the next candle, then BAS will take another buy.

All the usual stuff is included. Go to the HGB'nG thread to download the Shell User Guide if you do not already know how they work.

Have a play on demo folks, and see if this has anything to offer.

:xm:


Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. 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.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.

Useful utilities/EA's/scripts -

-
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

BAS

Post by SteveHopwood »

I see a few have downloaded BAS, so I have put V1a in post 1.

Imagine that there are 5,000 buyers and -1000 sellers, this will result in a power of -5 and so the ea will think the buying strength is weakening, so the new code attempts to fix this.

To make your own changes, go to line 1956 and delete all of this snippet:

Code: Select all

   
//How does shift + 1 affect the status
   if (TtfStatus == buysincontrol)
   {
      TtfStatus = buysincontrolweaker;
      if (TtfPower[1] > TtfPower[2])
         TtfStatus = buysincontrolstronger;   
   }//if (TtfSellers = buysincontrol)
 
then copy all of this - you will see an extra code block that I forgot to write originally.

Code: Select all

   //How does shift + 1 affect the status
   if (TtfStatus == buysincontrol)
   {
      TtfStatus = buysincontrolweaker;
      if (TtfPower[1] > TtfPower[2])
         TtfStatus = buysincontrolstronger;   
      if (TtfSellers[1] < 0)         
         TtfStatus = buysincontrolstronger;
   }//if (TtfSellers = buysincontrol)
   
   if (TtfStatus == sellsincontrol)
   {
      TtfStatus = sellsincontrolweaker;
      if (TtfPower[1] > TtfPower[2])
         TtfStatus = buysincontrolstronger;   
      if (TtfBuyers[1] < 0)         
         TtfStatus = sellsincontrolstronger;
   }//if (TtfSellers = sellsincontrol)
and recompile.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

BAS

Post by SteveHopwood »

V 1b is in post 1 with a fix for one of my copy/paste/forget-to-edit bloops.

It is in this block:

Code: Select all

   
   if (TtfStatus == sellsincontrol)
   {
      TtfStatus = sellsincontrolweaker;
      if (TtfPower[1] > TtfPower[2])
         TtfStatus = buysincontrolstronger;  ????????????????????????????????????????????????????????????????????????
      if (TtfBuyers[1] < 0)         
         TtfStatus = sellsincontrolstronger;
   }//if (TtfSellers = sellsincontrol)
The line with lots of ? marks should be:
TtfStatus = sellsincontrolstronger;

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
pandaboy
Trader
Posts: 49
Joined: Wed Nov 13, 2013 2:13 pm

BAS

Post by pandaboy »

Steve,

Thanks a lot for the new EA. :clap: I have been running this on all the 28 pairs since Tokyo Open and results have been really good.. Made around 160 pips and 40+ pips still floating.. The most exciting part is losers are small compared to winners. Hope this continue forever. :smile:

:hi:
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

BAS

Post by SteveHopwood »

pandaboy » Tue Dec 22, 2015 4:03 pm wrote:Steve,

Thanks a lot for the new EA. :clap: I have been running this on all the 28 pairs since Tokyo Open and results have been really good.. Made around 160 pips and 40+ pips still floating.. The most exciting part is losers are small compared to winners. Hope this continue forever. :smile:

:hi:
I only coded it because I was at a loose end. I have it on 4 EU charts: 1 with no other filter; one using M15 Slope; one using Bob's H4 240 MA; one using D1 CSS. The extra filters don't seem to make any difference as all four have been sending trades at the same time. Up about +240 at the mo.

Can't really believe trading can be this easy. We shall see.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

BAS

Post by patmontes »

Will join the fun testing :good:

I imagine a global closure target pips per day then restarting trading the next day. We will see :hi:

Thanks for the new toy Steve!
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

BAS

Post by SteveHopwood »

patmontes » Tue Dec 22, 2015 5:54 pm wrote:Will join the fun testing :good:

I imagine a global closure target pips per day then restarting trading the next day. We will see :hi:
Yes. I forgot to mention that I have the bot set to run 7.00 - 17.00 GMT.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

BAS

Post by patmontes »

Hi Steve,
Do you foresee any issues on the code running HGB and BAS on the ssme Empty4 terminal?
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

BAS

Post by SteveHopwood »

patmontes » Wed Dec 23, 2015 4:40 pm wrote:Hi Steve,
Do you foresee any issues on the code running HGB and BAS on the ssme Empty4 terminal?
No. Use a different MagicNumber and there will be no problem.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

BAS

Post by patmontes »

SteveHopwood » Wed Dec 23, 2015 5:05 pm wrote:
patmontes » Wed Dec 23, 2015 4:40 pm wrote:Hi Steve,
Do you foresee any issues on the code running HGB and BAS on the ssme Empty4 terminal?
No. Use a different MagicNumber and there will be no problem.

:xm:
Cheers.. I have BAS on EU today and made good profits :party:
Post Reply

Return to “Automated trading systems”