EA Brazilian Market Daytrade, that combine close of order by time and by price. EA para WIN/WDO com fechamento por tempo e/ou por preço.

MQL5 エキスパート

仕事が完了した

実行時間9 日
依頼者からのフィードバック
Desenvolvedor de ótimo nível, recomendo muito.

指定

EA to Brazilian Market on MT5.

The Brazilian Market open  9:00 AM and close 18:00 PM. Monday to Friday, except holydays.

The EA will operate two charts .  Below quick explaining about these currencies.  Only to understand.

This Daytrade Market don’t accept Hedge deals. Will operate one type of deal each time (buy or sell).

Examples:

- If start deal selling “1 lot”, one new deal buying  “1 lot” will close the first sell, and vice versa. 

- If start deal selling “2 lots”, one new deal buying  “1 lot” will close “1 lot” of sell and will remaining “1 lot” of sell. (partial close) and vice versa.

 

1.Bovespa Index 

(Basic Symbol WIN followed by one letter that represents the Month  and a number that represent the year ) .  Each month have a standard letter.

 Example: Bovespa Index to December 2018 = WINZ18

The value turn around 90,000 pts.  The minimum spread and minimum variation is 5 pts (tick size).

The minimum lot size is “1”. There are not decimal lots.



 

2. Real (brazilian currency)  x Dollar 

(Basic Symbol WDO followed by one letter that represents the Month  and a number that represent the year ) .  Each month have a standard letter.

Example:  Real x Dollar  to December 2018 = WDOZ18

The value turn around 3,800.0 pts.  The minimum spread and minimum variation is 0.5 pts (tick size).

The minimum lot size is “1”. There are not decimal lots.


 

 

So, lets start Specifications:

The explanation are the same for WIN and WDO. Let’s use WIN to explain.

As said, the market open and close everyday (9AM – 18PM).  So everyday may exist a GAP between close and open:


The value of GAP are calculated by difference between two  schedule defined on EA inputing .




Example:

Input Initial GAP Schedule (horary): 17:57 Open price =89290   

Input final GAP Schedule (horary): 9:00 Open Price =88950. So GAP equal -340 pts in this case.

Any other schedule (horary) may be seted to determine a “GAP”.

Another example: :  

Input Initial GAP Schedule(horary): 17:20 Open price =87500

Input final   GAP Schedule (horary): 09:12 Open Price =87950. So the GAP is equal +450 pts in this case.

So, defined the GAP, there are  filters  to start a deal in a determined moment. The value of GAP is absolute for first and second filter, don’t matter if are negative or positive.


First filter: Minimum GAP_________If GAP>= “x” points, open a deal.  If GAP<”x”points, don’t operate.

Second  filter: Maximum GAP_________If GAP<= “x” points, open a deal.  If GAP>”x”points, don’t operate.

Third filter:

If the GAP is positive, consider that the “Trade Trend” is BUY to after SELL higher.    

If the GAP is positive, consider that the “Trade Against Trend” is SELL to after BUY Lower.          

If the GAP is negative, consider that the “Trade Trend” is SELL to after BUY Lower.    

If the GAP is negative, consider that the “Trade Against Trend” is BUY to after SELL higher.


Fourth filter: Schedule (horary) of open deal (hour of open (hh:mm:ss))

Obeying the previous three filters, the deal will open in a defined schedule.

Example: 09:01:15

Lots Size: number of Lots (1 or more). There are not decimals.


Fifth filter:  Types of close deals. By time,  by TP/SL, or combined.

Like explained before,  this Brazilian market don’t accept Hedge deals.  If start deal selling “1 lot”, one new deal buying  “1 lot” will close the first sell, and vice versa.  If start deal selling “2 lots”, one new deal buying  “1 lot” will close “1 lot” of sell and will remaining “1 lot” of sell. (partial close) and vice versa.  The same for any size of lots. So, we can use many types of partial close.

The partial close can be by TP/SL and by schedule (horary), or can be combined between these two forms.

Example to understand idea:

Lets assume conditions below:

1.Input Initial GAP Schedule: 17:45 Open price =86500

2.Input final   GAP Schedule: 09:01 Open Price =86350.   So the GAP is equal -150 pts in this case.  

3. Minimum GAP>=100 (1st condition to open a deal is OK. Absolute value, don’t matter if are positive or negative)

4. Maximum GAP=300  (2nd condition to open a deal is OK Absolute value, don’t matter if are positive or negative)

5.Trade Trend= true (so the Deal will be a Sell in this case)

6. Schedule of open deal (hour of open (hh:mm:ss)) = 09:01:37 (lets assume that the market price is 86300 in this moment.)

7. Size of Lots=5 

8. Combined close deal.  Below the system of close (option to close 3 by SL/TP and 3 by time). The number of lots equal “0” means that is disabled.

- Close of Deal 1 by price : (will close part of lots)

Number of lots to close: 1

TP: 50pts or Trailing Stop

SL: 120pts

Trailing stop: true or false (effective trailing stop like the video https://www.youtube.com/watch?v=hSEcSC7l3NQ )

 

- Close of Deal 2 by price: (will close part of lots)

Number of lots to close: 3

TP: 75pts or Trailing Stop

SL: 180pts

Trailing stop: true or false

 

   - Close of Deal 3 by price: (will close part of lots)

Number of lots to close: 0  (equal “0” means not active, don’t matter TP/SL)

TP: 50pts or Trailing Stop

SL: 120pts

Trailing stop: true or false

 

- Close of Deal 4 by TIME : (will close part of lots)

Number of lots to close: 1

Schedule of close: (hour of close (hh:mm:ss)) = 09:22:45

SL: 120pts

Trailing stop: true or false

 

- Close of Deal 5 by TIME : (will close part of lots)

Number of lots to close: 1

Schedule of close: (hour of close (hh:mm:ss)) = 09:27:10

SL: 200pts

Trailing stop: true or false

 

- Close of Deal 6 by TIME : (will close part of lots)

Number of lots to close: 0 (equal “0” means not active, don’t matter TP/SL or Schedule)

Schedule of close: (hour of close (hh:mm:ss)) = 09:27:10

SL: 200pts

Trailing stop: true or false

 

*Note that the somatory of “closes” is equal to opened deals.

* First sketch of EA using the concept of GAP, Horary of Open Deal, Horary of Close Deal and SL. This is more simple and fast to study the project and make some tests. 

* The Trailing stop must be studied the best form possible. I have no totally clear idea yet. Maybe develop in two steps. First with more simple fixed TP/SL and after tested, implement the trailing.  Lets talk about.

* To test, install MT5. Use Demo Account Server: Terra Investimentos DTVM  Login: 9012767 Password: DEMO1234          

* Any doubt, please contact me.                                                                                                                                                                             


応答済み

1
開発者 1
評価
(46)
プロジェクト
80
13%
仲裁
11
0% / 91%
期限切れ
51
64%
2
開発者 2
評価
(229)
プロジェクト
339
49%
仲裁
21
5% / 33%
期限切れ
24
7%
3
開発者 3
評価
(414)
プロジェクト
670
33%
仲裁
60
17% / 32%
期限切れ
113
17%
仕事中
4
開発者 4
評価
(3)
プロジェクト
3
33%
仲裁
0
期限切れ
0

プロジェクト情報

予算
50 - 100 USD
締め切り
最高 5 日