HGBnD shell

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
kennychua
Posts: 7
Joined: Sat Feb 27, 2016 6:12 am

HGBnD shell

Post by kennychua »

Hi Steve

This bug have gone unnoticed for awhile.

Currently the code inside DrawPeaks function is

Code: Select all

   //Adapt them if they are too short to be visible on the chart
   if (currentPeakHighBar < 4)
      currentPeakHighBar = 4;
   if (currentPeakLow < 4)
      currentPeakLowBar = 4;
The effect of this bug is that, blsh will be long always when the currentPeakLow price is < 4. This is because currentPeakLowBar get set to 4, which most of the time cause the check for short direction using currentPeakHighBar (4 or more) < currentPeakLowBar (4) to be FALSE, therefore it default to long direction.

The code should be

Code: Select all

   //Adapt them if they are too short to be visible on the chart
   if (currentPeakHighBar < 4)
      currentPeakHighBar = 4;
   if (currentPeakLowBar < 4)
      currentPeakLowBar = 4;
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.

HGBnD shell

Post by SteveHopwood »

Nice one Kenny. Thanks very much. :clap: :clap: :clap: :clap: :clap: :clap:

Fixed library in post 1. Simple DIY at line 2918 where
if (currentPeakLow < 4)

should be
if (currentPeakLowBar < 4)

: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
1Direction
Trader
Posts: 97
Joined: Sun Jan 29, 2017 8:37 pm
Location: London

HGBnD shell

Post by 1Direction »

As many of you myself included supervise their EA and close positions manually maybe it could be helpful to add a function to assist manual interventions within the EA.

What I'm doing multiple times per day is to check if a pair with multiple open positions i.e. >10 turns into total positive I then use Steve's script "Close All Trades and Delete All Pendings Script This Symbol Only" to close all trades on the pair. This helps to reduce margins and drawdowns. I've set basket take profit to 50% ATR which do the trick when market moves nicely and we can pocket in some great profit but we know this can take some times.

The idea would be to have the EA send an alert when a symbol open positions become positive (cash UPL >0) and has more than X open positions. It would then give the option to trigger the mentioned closing script. I'm not a developer so I don't know how easy this would be to code or if you guys think it could be an useful addition to the current shell.

Thanks for reading
Post Reply

Return to “Thingy Bob EA's”