Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal


custom trail-stop by MA - expert for MetaTrader 5


votes: 8
2020.06.21 02:30
2020.06.28 03:49
my_ts6.mq5 (9.21 KB)view
the EA only trails, so no automatic buy/sell

besides the MA parameters, it also got a few options for the trailing

-max stop loss and the possibility of closing the orders that exceed it
-number of bars behind to use in MA trail
-minimum distance from MA to trail 
-minimum distance of current price to trail on positive and on negative profit

the code probably can be optimized further
feel free to post suggestions, or changes to the code that can improve it

i`ve been trying to control the indicator`s appearance - line, color and style. any help will be welcome

file updated after consideration on how to treat preexisting orders that exceed max sl and the EA don`t have permission to close them

Basic List Basic List

A basic container for storing an ordered list of basic data type objects.

Object List Object List

A basic container for storing an ordered list of objects.

Pan PrizMA CD Phase Sin leverage 72 Pan PrizMA CD Phase Sin leverage 72

Calculates the phase and amplitude of the expected wave

Forex market sessions identification Forex market sessions identification

This script highlights Forex sessions for Sydney, Tokyo, London and New York with colored rectangles, according to the user time definitions.