Stochastic + Tendency Channel Strategy correction

仕事が完了した

実行時間7 日
依頼者からのフィードバック
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.
開発者からのフィードバック
Buen trabajo, gracias por todo.

指定

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.


応答済み

1
開発者 1
評価
(38)
プロジェクト
40
25%
仲裁
20
15% / 75%
期限切れ
8
20%
多忙
2
開発者 2
評価
(68)
プロジェクト
77
8%
仲裁
33
9% / 55%
期限切れ
6
8%
仕事中
3
開発者 3
評価
(63)
プロジェクト
99
29%
仲裁
1
100% / 0%
期限切れ
2
2%
4
開発者 4
評価
(130)
プロジェクト
184
32%
仲裁
17
29% / 59%
期限切れ
27
15%
仕事中
5
開発者 5
評価
(196)
プロジェクト
318
35%
仲裁
64
13% / 56%
期限切れ
82
26%
6
開発者 6
評価
(14)
プロジェクト
22
23%
仲裁
7
43% / 29%
期限切れ
3
14%
取り込み中
7
開発者 7
評価
(4)
プロジェクト
2
0%
仲裁
2
50% / 0%
期限切れ
0
8
開発者 8
評価
(4)
プロジェクト
6
0%
仲裁
5
0% / 80%
期限切れ
2
33%
9
開発者 9
評価
(253)
プロジェクト
407
38%
仲裁
85
42% / 19%
期限切れ
70
17%
取り込み中
10
開発者 10
評価
(56)
プロジェクト
175
71%
仲裁
4
100% / 0%
期限切れ
1
1%
11
開発者 11
評価
(66)
プロジェクト
143
34%
仲裁
10
10% / 60%
期限切れ
26
18%
12
開発者 12
評価
(121)
プロジェクト
155
43%
仲裁
20
60% / 20%
期限切れ
8
5%
仕事中
類似した注文
I want to design a website like https://www.ngnrates.com/ we will change some stuff but not much, if you can deliver a website like this let me know your budget and readiness to implement
Hi, I need a robot, which wil get instructions to trade in 3 symbols at the same time based on few parameters and calculations. Example: There is 1 symbol called Gold-Near and the rate for it is 1000-1002 If i specify that when the rate reaches 1050, it should sell 1 lot Upon execution it will have to sell 1 lot of cme gold, buy 3 lots of mcx gold and buy currently (lots will be based on calculation). All the
Hello, i am searching for an experienced, professional software engineer, who can convert three Indicators from MQL4 to MQL5. This may sound like an easy job, but one indicator is like a trading system and therefore a bit complex. So you need to have a very good understanding of both languages. You should also be able to code MQL5 classes ( https://www.mql5.com/en/docs/basis/oop ). The intention is to code MQL5
I have a full code ,, There are some errors in this.It does not add to the chart, does not show arrow marks, does not alert ,, fix this problem and work properly,, Contact on telegram @Gw_rakib1
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Tradingview developer 30 - 35 USD
Hey greetings. I am in need of tradingview developer that can modify an open source PineScript indicator code to add additional features. Kindly bid for this project if it is what you handle and let proceed with the project
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
looking for help to get my ibkr automated, i have strategies already built in composer and have JSON for them, i really just need to he setup and explanation on how to maintain it and add new strategies
The following url shows the steps to get MT4 to communicate with a MS SQL Server Express database. I need help getting that to work as the article is not making sense to me Integrating MetaTrader 4 Client Terminal with MS SQL Server - MQL4 Articles (mql5.com)

プロジェクト情報

予算
30 - 70 USD
開発者用
27 - 63 USD
締め切り
最高 15 日