Stochastic + Tendency Channel Strategy correction

İş tamamlandı

Tamamlanma süresi: 7 gün
Müşteri tarafından geri bildirim
This is the first job I have ever requested and the code provided does what I put in the requirements, I appreciate the effort. Good job.
Geliştirici tarafından geri bildirim
Buen trabajo, gracias por todo.

İş Gereklilikleri

The principle for this work is to create a code for MQL5 that uses the stochastic and a tendency channel.


The strategy that is required to be corrected is based on the next:


Buy condition:

1.-  There need to be an uptrend. Mainly in my strategy I use the CHOCH and BOSS (  I didn't programed this on the provided code. ) to determine in which direction is the price going and I mark a tendency channel using the 2 maximum values and 2 minimum values. If it matches with more maximum and minimum levels that’s better. See the example in the images added.

2.- The Stochastic shows a cross between %K and %D, where %K crosses from bellow to above %D, making a condition similar to this:

(KValue0 > 20 && DValue0 > 20 && KValue0 > DValue0 && KValue1 <= DValue1 && KValue2 < DValue2) And (KValue0 > 20 && DValue0 > 20 && KValue0 > DValue0 && KValue1 >= DValue1 && KValue2 < DValue2)  See the example in the following slides.

3.- The price should be between the lower and middle lines of the tendency channel.

Sell condition:

1.-  There need to be an downtrend.

2.- The Stochastic shows a cross between %K and %D, where %K crosses from above to bellow %D, making a condition similar to this:

(KValue0 < 80 && DValue0 < 80 && KValue0 < DValue0 && KValue1 >= DValue1 && KValue2 > DValue2) And (KValue0 < 80 && DValue0 < 80 && KValue0 < DValue0 && KValue1 <= DValue1 && KValue2 > DValue2)  See the example in the following slides.

3.- The price should be between the upper and middle lines of the tendency channel.


The position should be opened with the following:


Sell position:

-The STP (Stop Loss) should be 3 points bellow the lower minimum of the previous 4 candles.

-The TP (Take Profit) should be 2 times the distance of the STP – Actual Price. Example: STP=15+3 , TP= (15+3)*2=36

Sell position:

-The STP (Stop Loss) should be 3 points above the higher maximum of the previous 4 candles.

-The TP (Take Profit) should be 2 times the distance of the STP – Actual Price. Example: STP=15+3 , TP= (15+3)*2=36


I require that if the account loss 1.5% of its total, stop the tradings and notify me via email. Example: the account started the day with 10000 dlls, and 13 hours after it losses 150 dlls it stops


Note: In the documents I added a code I was working in to try and do these things, please check it and tell me if it can be reworked or what can we do.
Also I added some lines to prevent the opening of operations 2 or 3 candles after one was opened and other lines to close the positions when the conditions where met.

Please use these conditions or some similar to do the same. 



The code I provided does the following:

1.- It calls the stochastic, EMA and MACD indicators (the last two are for trend identification, if you have a better way to detect trends be free to modify it or improve the conditions)

2.-Creates a tendency Channel using the all the candles in the screen but it may or may not be the better way to adapt to the strategy described above, becouse the channel does not identify the changes of tendency that fast.
3.- Open and close orders, but it a lot of times does not open a position even if the conditions are met, so the code needs help there, and sometimes it does not open the correct type of order, so I changed the order type from buy and stop to buy stop and sell stop.

4.-It prevent the opening of operations 2 or 3 candles after one was opened and other lines to close the positions when the conditions where met.

5.- I added an example for the price detection of highest high and lowest low at the end of the code, but i couldn't implement the operation to obtain the correct value for TP (2 times the STP distance)

The examples I used were the basic ones, I don’t know a lot of ways to do a trading code since I am a Mechatronic Engineer and I don’t know a lot of the things of the MQL5 language. If you know a better way to do the code feel free to tell me.


If you require more examples of the strategy that I explained on top and shown on the images or need more details please notify me.


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(45)
Projeler
46
24%
Arabuluculuk
34
9% / 85%
Süresi dolmuş
10
22%
Serbest
2
Geliştirici 2
Derecelendirme
(72)
Projeler
80
10%
Arabuluculuk
38
8% / 58%
Süresi dolmuş
6
8%
Serbest
3
Geliştirici 3
Derecelendirme
(85)
Projeler
166
43%
Arabuluculuk
3
67% / 0%
Süresi dolmuş
5
3%
Çalışıyor
Yayınlandı: 1 kod
4
Geliştirici 4
Derecelendirme
(130)
Projeler
184
32%
Arabuluculuk
18
28% / 67%
Süresi dolmuş
27
15%
Serbest
Yayınlandı: 1 kod
5
Geliştirici 5
Derecelendirme
(206)
Projeler
333
35%
Arabuluculuk
66
12% / 58%
Süresi dolmuş
87
26%
Serbest
6
Geliştirici 6
Derecelendirme
(19)
Projeler
31
32%
Arabuluculuk
8
50% / 25%
Süresi dolmuş
3
10%
Çalışıyor
7
Geliştirici 7
Derecelendirme
(4)
Projeler
2
0%
Arabuluculuk
2
50% / 0%
Süresi dolmuş
0
Serbest
8
Geliştirici 8
Derecelendirme
(4)
Projeler
6
0%
Arabuluculuk
5
0% / 80%
Süresi dolmuş
2
33%
Serbest
9
Geliştirici 9
Derecelendirme
(295)
Projeler
472
40%
Arabuluculuk
102
40% / 24%
Süresi dolmuş
78
17%
Meşgul
Yayınlandı: 2 kod
10
Geliştirici 10
Derecelendirme
(77)
Projeler
243
74%
Arabuluculuk
7
100% / 0%
Süresi dolmuş
1
0%
Serbest
Yayınlandı: 1 makale
11
Geliştirici 11
Derecelendirme
(69)
Projeler
146
34%
Arabuluculuk
13
8% / 62%
Süresi dolmuş
26
18%
Serbest
Yayınlandı: 6 kod
12
Geliştirici 12
Derecelendirme
(144)
Projeler
186
41%
Arabuluculuk
24
58% / 21%
Süresi dolmuş
13
7%
Serbest
Benzer siparişler
Attach up to 32 files maximum 16 Mb per upload (.zip .txt .log .mqh .ex5 .mq5 .mq4 .mqproj .ex4 .mt5 .set .tpl .cl .py .sqlite .csv .ini .ipynb .onnx .gif .png .jpg .jpeg .mp4 .webm)
I need a scalping-specific logic MT5 trading bot with a Donchian-channel–based dynamic stop-loss and take-profit system, applies RSI volatility filtering to avoid low-quality setups, and allows asset-specific adjustable parameters for fine-tuning performance Trading details: - Symbol: Any Forex EUR/USD - Platform: MT5 - Strategy type: Scalping (fast trades) - Timeframes: 5sec/ M1 / M5 - Fixed Stop Loss and Take
Hi, I am experiencing several issues with the current bot system and would like to implement a fully automated and improved version with the following features: 1. Dynamic selection of best two timeframes: • Currently, sometimes M15 gives a sell signal while M5 gives a buy signal. • I want the bot to automatically select the best two timeframes that are aligned with the SMC H1 trend to generate the signal. • This
Zaki boot 30+ USD
//+------------------------------------------------------------------+ //| XAUUSD Safe Scalp - TP $2 / SL 60 points | //+------------------------------------------------------------------+ #include <Trade\Trade.mqh> CTrade trade; // ===== Inputs ===== input double LotSize = 0.01; input int StopLoss = 60; // points input double DollarTP = 2.0; // ربح بالدولار input int MAPeriod = 50; input
Looking for an experienced MQL5 developer to analyze and reverse-engineer the trading logic of an existing scalping Zone Recovery EA using Moving Averages and Bollinger Bands, and then rebuild it
EA Expert MTA 4 30+ USD
I have my own indicator and needs to create EA expert working smoothly with it to hit the targets as defined in indicator: Technical approach: - The EA will read the indicator signals using Copy Buffer on the selected timeframe - The EA should hit indicator variable targets factor -​Auto-Entry: Instant execution when the signal appears. ​-Alerts: Mobile Push Notifications + Pop-up alerts. -​Money Management Auto-lot
hello great developer I’m hiring a developer to build a local-only trade copier that sends trades from MT4 and MT5 to NinjaTrader 8 (NT8) in real-time. This copier must be reliable, fast, and fully executable without cloud dependence. I require a short test/demo period before full delivery to ensure quality and performance. here is the full project specs in the file check it please
I need a reliable, clean-coded Expert Advisor built for both MetaTrader 4 and MetaTrader 5 platforms. Main trading behavior: The EA follows buy and sell arrows produced by my custom indicator. Whenever a buy arrow shows up on the chart: if a sell position is currently open → close that sell immediately and enter a buy trade in its place. Whenever a sell arrow appears: if a buy position exists → close the buy and
Hello I'm looking for professional to create a robot to me that will enter us30 or nasdaq around 16H29-minute55-Second New York session opening Monday to Friday and put stop loss 3800 points away from entry hedging strategy
*I am looking for an experienced MQL5 developer to build a custom Expert Advisor (EA) for MetaTrader 5 based on my proprietary trading strategy. The full strategy details will be shared privately with the selected developer after agreement. The EA must be designed for automated trade execution with a strong focus on accuracy, speed, and stability. It should support flexible input settings and allow for future

Proje bilgisi

Bütçe
30 - 70 USD
Son teslim tarihi
to 15 gün