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

1
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.
These users thanked the author kirkleefx for the post (total 2):
Jedidiah, SijjiN


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

2
kirkleefx wrote: Sun Oct 23, 2022 7:05 am Having both 'add spread' and 'add additional pips' (and 'both') available will make it easier to experiment with and see what works best.
This is a cool idea and a very well laid out post. Mrtools and the other coders will be online later. Let's see what they can do! 👍
These users thanked the author ChuChu Rocket for the post:
Jedidiah
Important: The worst forex brokers of all time 👎




Who is online

Users browsing this forum: Amazon [Bot], ChatGPT [Bot], Grapeshot [Bot], IBM oBot [Bot], Intrest 1, kvak, maroka, ssscary, Telegram [Bot] and 91 guests