stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

HGBnD shell
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5077
Page 5 of 5
Author:  kennychua [ Tue May 09, 2017 5:16 am ]
Post subject:  HGBnD shell

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;
Author:  SteveHopwood [ Tue May 09, 2017 10:31 am ]
Post subject:  HGBnD shell

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:
Author:  1Direction [ Wed May 10, 2017 8:03 am ]
Post subject:  HGBnD shell

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
All times are UTC Page 5 of 5