- From theory to practice
- How to find traders and analysts to work in the office
- Help.
Expert Advisors must be flexible in trade environment. Most advisors don't have any strategies and they are not flexible..
What I’m describing is not necessarily the best strategy, but it is a strategy that can be used within trends, is flexible, and can be effective.
In simple terms:
The EA enters trades based on the overall trend
(it should not enter at extreme new highs/lows).
After entering a trade:
- In the ideal scenario, the TP is hit, and the trade closes in profit along the trend.
- In the second scenario, if the trade goes into loss, the EA can open additional positions at two or three key levels, with larger lot sizes, to compensate for the initial trade.
To avoid turning this into a dangerous martingale, the continuation should be limited to only two or three key levels.
Instead of relying only on stop loss, a maximum number of trades and a defined percentage of the total account should be set, so if losses exceed that threshold, trading is stopped.
This strategy should be used selectively during the day at specific points, and its smooth execution depends on the developer’s creativity and implementation.
It's rather interesting that you require flexible strategies and yet at the same time, you're narrowed down to trend strategies. I hereby posit to you that there is such a thing as a detrended strategy─where only recent price movement is relevant. How do you like that for flexible?
What I’m describing is not necessarily the best strategy, but it is a strategy that can be used within trends, is flexible, and can be effective.
In simple terms:
The EA enters trades based on the overall trend
(it should not enter at extreme new highs/lows).
After entering a trade:
- In the ideal scenario, the TP is hit, and the trade closes in profit along the trend.
- In the second scenario, if the trade goes into loss, the EA can open additional positions at two or three key levels, with larger lot sizes, to compensate for the initial trade.
To avoid turning this into a dangerous martingale, the continuation should be limited to only two or three key levels.
Instead of relying only on stop loss, a maximum number of trades and a defined percentage of the total account should be set, so if losses exceed that threshold, trading is stopped.
This strategy should be used selectively during the day at specific points, and its smooth execution depends on the developer’s creativity and implementation.
The dilemma is that every price movements are not describing same thing, so if it is possible to find strategies to use last price movements as a part of source, that will be great
You might want to have a look at TD Lines originally created by Tom Demark─which only evaluate recent price movements.
MT5 indicator:
Suggested reading:
Thank you for your suggestion i will read it immediately
FYI, manually calculating the Demark Lines Targets is rather daunting so I added them to the indicator:
Forum on trading, automated trading systems and testing trading strategies
Ryan L Johnson, 2026.04.11 18:10
@rossforex, Thanks for coding and posting your Demark Lines indicator source code.
I've taken the liberty of adding Demark Lines Targets to your code:
As you can see, I've also truncated the trendlines. The new inputs are fairly self-explanatory but the TPlineLength input also controls the projection of trendlines into the future.
Two new Buffers, 4 and 5, store the target prices as LongTP and ShortTP, respectively. Those are "hidden" Buffers for use with iCustom() in an EA─to avoid having to use GlobalVariables.
In the case that multiple trendlines per side are selected in the inputs, the targets are only calculated using the current trendlines. A precise definition of Demark Lines Targets can be found at:
https://forex-strategies-revealed.com/files/user/TDTL.pdf
Just note that I coded over the weekend. Therefore, this edited version has only been tested in the visualizer.
I try to use non-lagging indicators which are quantitative, and not based on market structure price action.
I use 3 trend indicators together and I'm seeing that it's still not always easy to "beat" the market with all the fakeouts and market reactions to news impact. But there are indicators I like which find reliable trend changes such as Elders MACD impulse system.
Market structure indicators can be used in EAs, but differently...because you could only reliably trade on CHoCH, as a break of structure may already be historical when it's confirmed.My trend strategy is to create what I call "chance" trades. You think it's a good time to enter based on the current trend, but after entering - sometimes it's another story because of incoming volatility. So I try to take a small loss and make the EA find the next opportunity.
It's very difficult to perfect the art of scalping like this in automation. I'm using a fixed number of bars to determine trend weakness and close the trade if the profit is still floating in a small loss after a certain amount of bars since trade open. If I can find more intelligent Exit conditions, then I could really get somewhere.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use


