Script for Sizing TP and SL based on % of average range - is there one?

 

Another topic reminded me of a script I custom ordered a few years ago that was a bit clunky so I moved on and forgot about it.

The idea is to run a script on demand on any chart that will calculate a fixed profit target and stop loss on the basis of XX bars or the average daily range over XX period that will apply only to the open poisitons of a single pair or commodity where the script is run. 

My old script opened a window where I could select the number of bars to average and then set a Target Price of XXX% and a Stop Loss of XXX% that would be sent to the bróker.  It does not have to be virtual since the idea I have protection in for those positions while I am doing something else.  

I trade both currency pairs and commodities so the standard EAs that "do everything" don't fit me well and I also want confirmation with  the bróker in case of computer failure, connection failure, etc.

If anybody knows of a script like this or similar, I would appreciate it.

If it hasn't been done (hard to believe) then I am willing to commission building the script.

I want a script and not  an EA.  My MT4 is very busy already.

Me: Michael Maggi for a PM or reply here is OK with me.

 
 

TrailingStopBE(OP_SELL,(iATR(NULL, PERIOD_CURRENT, 30, 0)/4) );

I use this for breakeven. Same principle applies to ATR stop or target.  

 
ForexTrader17:

TrailingStopBE(OP_SELL,(iATR(NULL, PERIOD_CURRENT, 30, 0)/4) );

I use this for breakeven. Same principle applies to ATR stop or target.  

???? ^_^
 
In the Source Code I found a collection of scripts for adding stop loss and profit targets. It has lots of parameters and maybe it will be just as good as getting a script and setting the average.  I trade up to 12 commodities or currency pairs at a time using some manual Renko charts and 4 different EAs.  A script that does what I want and when I want it is important to me but these may work fine.  Thanks for the suggestion as I am new to this site if not MT4.  Trading and not programming is my interest so I usually just ask and pay for what I want.  I am highly suspect of "free" anything.
Reason: