Download MetaTrader 5

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

To add comments, please log in or register
Share your knowledge. Become a well-known developer!
Michael Maggi
1284
Michael Maggi 2016.02.05 13:56 

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.

Alain Verleyen
Moderator
30640
Alain Verleyen 2016.02.05 18:03  
ForexTrader17
1041
ForexTrader17 2016.02.05 18:23  

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

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

Roberto Jacobs
46341
Roberto Jacobs 2016.02.05 19:33  
ForexTrader17:

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

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

???? ^_^
Michael Maggi
1284
Michael Maggi 2016.02.06 21:31  
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.
To add comments, please log in or register