Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Join our fan page
You liked the script? Try it in the MetaTrader 5 terminal
- Views:
- 11427
- Rating:
- Published:
- 2018.12.18 19:21
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Trend Signal trend-following indicator specifies the change of a trend when Close price breaks through the specified range of bars upwards or downwards.
The Risk parameter allows defining the distance from the extreme price for this period.
We define it as a percentage of the range for this period.
It has two configurable parameters:
- Period - range calculation period
- Risk - percentage of range over Period
Calculation:
- If PrevClose < Max and Close > Max
Upward breakthrough = Bullish signal
- If PrevClose > Min and Close < Min
Downward breakthrough = Bearish signal
where:
Max = max-(max-min) * Risk / 100.0
Min = min+(max-min) * Risk / 100.0
Max, min are the highest and lowest prices within the Period interval
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/22437