Attachments forums

List of attachments posted on this forum.


All files on forums: 160545

Help needed please - wanting to add the spread to this indicator - Highest-Lowest.mq4

kirkleefx, Sun Oct 23, 2022 6:58 am

Hello all, I hope someone can assist.

I use the 'Highest-Lowest' indicator as a Stop Loss in my automated system, however too often I am stopped out because this indicator only offers the actual highest / lowest points over 'x' number of bars, and there is no current way of adding a pip spread to this value.

I am hoping someone with coding experience can assist by adding the following functionality to this indicator:

- extern bool "Add Spread?" = true;
- extern bool "Add Additional Pips? (Y/N)" = false;
- extern bool "Add Spread + Additional Pips? (Y/N)" = false;
- extern int = Additional Pips Value = 5;


Having 'Add Spread' and 'Add Additional Pips' (and the 'both' option) available will make it easier to experiment with and see what works best.

Last thought...as I only trade XAUUSD, I am also wondering how to normalize digits to ensure the SL value can automatically update for different pairs, i.e. if I enter '3' as the SL value, this will work on EURUSD for example, but it will need to automatically update to '30' for XAUUSD.

I appreciate any assistance. I have been trying to code this myself but just can't manage to get it to work.
All files in topic