hi,
i think it's better to place order with price line cross the indicator line ( each time the price line cross the indicator )
hi,
Please, where is these indicator, Phillipe? Where is the trendline indicator? Thanks.Works well!
Thanks for your great job Mr Tanaka.![]()
https://www.mql5.com/en/market/product/36087?source=Site+Market+MT4+Indicator+Free+Rating006Please, where is these indicator, Phillipe? Where is the trendline indicator? Thanks.
// Moving Averages
shortMA = ta.sma(close, 20)
longMA = ta.sma(close, 50)
// RSI
rsi = ta.rsi(close, 14)
// Outside Bar Logic (reversed)
isOutsideBar = high > high[1] and low < low[1]
if (isOutsideBar)
if (close < open and close < shortMA and shortMA < longMA and rsi > 70)
strategy.entry("OutBarLE", strategy.long, qty=1, comment="OutBarLE") // Enter Long when original would enter Short
if (close > open and close > shortMA and shortMA > longMA and rsi < 30)
strategy.entry("OutBarSE", strategy.short, qty=1, comment="OutBarSE") // Enter Short when original would enter Long
// Calculate Stop Loss and Target Profit for Long Positions
longStopLoss = strategy.position_avg_price * (1 - stopLossPercent)
longTargetProfit = strategy.position_avg_price * (1 + targetProfitPercent)
// Calculate Stop Loss and Target Profit for Short Positions
shortStopLoss = strategy.position_avg_price * (1 + stopLossPercent)
shortTargetProfit = strategy.position_avg_price * (1 - targetProfitPercent)
// Exit Conditions for Long Positions
if (strategy.position_size > 0) // Long position
strategy.exit("Take Profit/Stop Loss", "OutBarLE", stop=longStopLoss, limit=longTargetProfit)
// Exit Conditions for Short Positions
if (strategy.position_size < 0) // Short position
strategy.exit("Take Profit/Stop Loss", "OutBarSE", stop=shortStopLoss, limit=shortTargetProfit)
```
### Explanation of the Strategy and Indicators
1. **Opposite Entry Conditions**:
- The strategy reverses the entry conditions. It enters long positions when the price closes lower than it opened and vice versa. Additionally, it checks if the short-term moving average is below the long-term moving average for long entries and above for short entries.
2. **Indicators**:
- **Moving Averages (MA)**:
- A 20-period and a 50-period simple moving average are used to confirm the trend direction. Long entries are confirmed if the short MA is below the long MA, and short entries are confirmed if the short MA is above the long MA.
- **Relative Strength Index (RSI)**:
- An RSI with a 14-period setting is used. Long entries are confirmed if the RSI is below 30 (indicating oversold conditions), and short entries are confirmed if the RSI is above 70 (indicating overbought condition)
Mr.Tanaka can help create an EA using the above strategy please????!!
works well.M Tanaka Iput your bot "EA trend line" on XBTUSD 5 MN but twice.
2 windows opened.
Once for TP 2 et once for TP3.
But just order with TP 2 opened.
Hell Sr. Wich of two EA are this post
Mql5 file pleasePlease test this EA.
Low DD with XAUUSD TFH1
You can also try stoploss =900points
View attachment 151226
Below is default set
![]()
hi
pls
pls
i want this ea work on all frame times on real acccount
its make big profit 90%
help
email : [email protected]
scam history readhi
pls
pls
i want this ea work on all frame times on real acccount
its make big profit 90%
help
email : [email protected]
Testinghi
pls
pls
i want this ea work on all frame times on real acccount
its make big profit 90%
help
email : [email protected]
trailing stop 2 not good.Testing
Please give me the set file. EAtrenlineproWorks well!
Thanks for your great job Mr Tanaka.![]()
It's not run on my backtest ... it's not do any tradeHi , i found this EA on the forum and test it with EURUSD TF 5mn
the periode i can test is very short so during it it seems to be good but please someone can test it under a long period to have better sample.