EA to trade bollinger bands

MQL4 Experts

Tâche terminée

Temps d'exécution 10 jours

Spécifications

The name of this EA is Bollinger 1

The EA must run on MQ4 platform and open a trade when price approaches a Bollinger band.

Variables found below "Variable Name in Quotes" (Default Setting in parenthesis) Description after parenthesis:

"MOW" (calculated or collected from the system). Represents the minute of the week. 

"MOD" (calculated or collected from the system). Represents the minute of the Day. 

"FirstMOW" (1441) The first minute of the Week trades are authorized to be opened. 1441 should be 12:01 AM Monday 

"FirstMOD" (0) The first minute of the Day trades are authorized to be opened. 0 Disables the function.

"LastMOW" (7200) The last minute of the Week trades are authorized to be opened.

"LastMOD" (1441) The last minute of the Day trades are authorized to be opened. 1441 disables the function.

"CloseMin" (7800) The minute during the week all open trades are closed. 7800 should be 10:00 AM Friday. Chart Time.

"SinceBuy" (10) Minimum number of bars since the low of any bar touched or went below the lower Bollinger Band to enable a LONG opening order.

"SinceSell" (10) Minimum number of bars since the high of any bar touched or went above the upper Bollinger Band to enable a SHORT opening order.

"MinBal" (1,000,000) If the Net Account Value is below this number the EA will only enter new trades for 0.01 Lots. 

"Stop%" (0.25) Stop Loss is sent with the order. A value of 0.25 would have the Stop Loss set at 99.75% of Purchase price on Buy Orders and at 100.25% of Sale price on Sell Orders.

"%Risked" (1) Percentage of the account that will be lost if the trade results in a Stop Loss. With a value of 1 a thousand unit account would lose ten units of the base currency in the account if the trade stopped out at the S/L without slippage. More can be lost if the market gaps. Much more. If the account enters a trade with %Risked at 1 and Stop% at 0.25 the account would be leveraged 4:1 when this trade opens.

"TP%" (2) Take Profit is sent with the order. A value of 2 would have the Take Profit set at 102% of Purchase price on Buy Orders and at 98% of Sale price on Sell Orders.

"Period" (20) Length of the Bollinger Band in bars and based on the bar length selected NOT the chart time frame of the chart the EA is running on.

"Deviations" (3) Deviations of the Bollinger Band to be referenced.

"ApplyTo" (C) Indicates to apply the calculation to closing prices. There should be a few comment lines explaining how to change the application to other values such as (HLC/3)

"TrendLength" (2400) Length in bars of a SMA used to determine the probable direction of the underlying trend. 

"MS" (1) Maximum Spread in pips. The default setting will disable trading 99.9% of the time I need this to be set thoughtfully for each pair.

"EarlyOut" (0) If this is set to 1 any trade entered will be closed when the opposite band is approached.

"Approach" (1.0) This is the distance before the band is touched that the trade is entered. 1.0= 1* "MS" at the close of the last "Period" bars. 

Housekeeping Issues to be resolved: 

1. User is to set the timeframe of the chart to any standard time available from a drop down menu or similar. M1, M5, M15, M30, H1, H4, D1, W1, or MN. If the EA is dropped on a 5 minute chart and set to M15 it should run in the M15 timeframe and an event an hour ago is 4 bars ago not 12 bars ago, etc.

2. EA to work with price values of any number of digits with the decimal in any location.

3. All values that can be, are to be calculated only one time each bar. This will result in small inaccuracies. That it preferred to the overhead load of calculating each value continuously. The one exception is the decision to enter a new position which is checked each tick. Trades are entered on the first opportunity when the target is enabled and price meets the protocols.

4. Target Values for moving averages and Bollinger lines can be interpolated for the current bar based on last bar's value + previous bar + difference + or - last bar is above or below previous bar. One bar repaint is preferred to overhead load.

5. EA must have a "TradesInitiated" counter to eliminate the possibility of entering a trade more than one time in any bar. Set the counter to zero at the beginning of each bar and increase the count when a trade is opened. Disable opening a new trade when the value is >0.  

6.Text in the top Left corner of the chart should be populated with current information and read similar to this: "Trend=1.00013, Spread=5216, SinceBuy=38, Buy 2.37 Lots @ 1.24762, SL=1.24450, TP=1.27257" There will be no need of a SinceSell or sale values text line when the trend is >1.0 since the system will trade with the trend. If the trend was < 1.0 the line might read  "Trend=0.99927, Spread=5216, SinceSell=38, Sell 2.37 Lots @ 1.24762, SL=1.25074, TP=1.22267". In this case the displayed values of "SinceBuy" or "SinceSell" are not the values set by the user. They represent the actual number of bars since the price touched or approached the noted Bollinger Band.

7. IF NAV is <"MinBal" the trade is 0.01 Lots. If NAV is > "MinBal" the trade size is calculated by comparing the "Stop%" to NAV, "%Risked", and the nominal unit price of the pair being traded. Note the account could be below "MinBal" After a trade is stopped out.

8. Maximum Deviation from Quoted Price for Opening Orders should be "MS"  Closing Orders are at the market regardless of Deviation.

9. All charted prices are to be mid spread or half way between Bid and Ask.

10. All Buy orders to Open or to Close are to be based on Ask Prices.

11. All Sell to Open or to Close are to be based on Offered Prices.  

12. If "FirstMOD" is > "LastMOD" the EA must not shut down at midnight. It runs continuously from "FirstMOD" to "LastMOD". If "FirstMOD" = 601 and "LastMOD" = 120 then the EA is enabled from 10:00 AM daily until 1:59 the next morning.  If "FirstMOD" is < "LastMOD" the EA is never enabled to open a trade at midnight (unless FirstMOD = 0 or LastMOD >1440).

 

Long entry:

"MOW" is >"FirstMOW" and < "LastMOW"  

"MOD" is >"FirstMOD" and < "LastMOD"  

"SpreadRatio"> "MaxSpread" 

Trend is >1.0 (Trend is calculated by dividing the value of the "TrendLength" SMA from the previous bar by what it's value was "Period" bars prior to the last bar.

Low of each of the last "SinceBuy" bars of a "Period" "Deviations" Bollinger Band has been higher than the value of the lower band + ("Approach"*"MS")

"TradesInitiated" = 0 

Price on a recent tick is <= the value of a lower band of a "Period" "Deviations" Bollinger Band + "Approach"+"MS"

Enter immediately. Make "TradesInitiated" =1, Set S/L and T/P, Mark the Chart with an up Arrow below the Lower Bollinger Band Line.

Short entry:

"MOW" is >"FirstMOW" and < "LastMOW"  

"MOD" is >"FirstMOD" and < "LastMOD" 

"SpreadRatio"> "MaxSpread"  

Trend is <1.0 (Trend is calculated by dividing the value of the "TrendLength" SMA from the previous bar by what it's value was "Period" bars prior to the last bar.

High of each of the last "SinceSell" bars of a "Period" "Deviations" Bollinger Band has been lower than the value of the upper band - ("Approach"*"MS")

"TradesInitiated" = 0 

Price on a recent tick is >= the value of a upper band of a "Period" "Deviations" Bollinger Band - ("Approach"*"MS")

Enter immediately. Make "TradesInitiated" =1, Set S/L and T/P, Mark the Chart with an up Arrow below the Lower Bollinger Band Line. 

Early Exit:

If "EarlyOut" =1 and the opposite Bollinger Band is Approached.

If  "CloseMOW" is reached and positions are still open.

 

By way of observation the system would have opened three SHORT trades in the attached USDJPY Chart and the last trade will be a loser. In the NZDUSD chart illustrated the system would have opened a LONG trade at 21:18. It gets stopped out. Oh well.

Répondu

1
Développeur 1
Évaluation
(52)
Projets
133
44%
Arbitrage
14
50% / 29%
En retard
55
41%
Gratuit
2
Développeur 2
Évaluation
(54)
Projets
64
42%
Arbitrage
5
20% / 60%
En retard
4
6%
Gratuit
3
Développeur 3
Évaluation
(1853)
Projets
3455
88%
Arbitrage
73
40% / 15%
En retard
265
8%
Gratuit
4
Développeur 4
Évaluation
(89)
Projets
137
24%
Arbitrage
35
9% / 40%
En retard
52
38%
Gratuit
5
Développeur 5
Évaluation
(5)
Projets
14
86%
Arbitrage
2
0% / 100%
En retard
1
7%
Gratuit
6
Développeur 6
Évaluation
(80)
Projets
117
67%
Arbitrage
16
25% / 13%
En retard
12
10%
Gratuit
7
Développeur 7
Évaluation
(1091)
Projets
1771
61%
Arbitrage
14
64% / 7%
En retard
84
5%
Travail
8
Développeur 8
Évaluation
(11)
Projets
12
0%
Arbitrage
2
0% / 50%
En retard
1
8%
Gratuit
9
Développeur 9
Évaluation
(879)
Projets
1392
67%
Arbitrage
117
32% / 42%
En retard
215
15%
Gratuit
10
Développeur 10
Évaluation
(1235)
Projets
2820
80%
Arbitrage
156
22% / 43%
En retard
488
17%
Gratuit
11
Développeur 11
Évaluation
(107)
Projets
149
36%
Arbitrage
29
3% / 55%
En retard
35
23%
Gratuit
Commandes similaires
I have a custom EA that works fine in the live market trading, but when doing a back test in the strategy tester , it does not open sell orders. There are no errors or warnings; it just doesn't open sell orders. I've checked every possible reason that might be the reason why it does not open sell orders, but I can't find anything, especially since it works fine in the real market and it opens both buys and sells
The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform
Hi, I have an indicator from my friend, I want to copy it to my own MT5 can you do that for me. Here is the link
I installed the E.A. into the Experts folder in MT4. When I double click on it nothing happens. When I right click and "attach to chart" nothing happens. The E.A. is not grayed out, it simply will not attach. Any help would be greatly Appreciated
I have an EA and want to add few new logic to fetch profit taking factors and other values from an external master data and use it in existing EA
Hello Every one, Good day, I want from someone professional to create an EA is working on Mt5, This EA is working by depend on some indicators, and all those indicators must be working on MACD window, not on the chart, for more details please read my attached pdf file carefully. Many Thanks
I'm looking for an expert MQL5 developer that can create an EA that's based on my price action trading strategy with no indicators. The EA must analyze trades based on my price action rules, enter trades based on my price action rules, manage trades based on my price action rules and exit trades based on my price action rules
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
We are looking for an experienced Expert Advisor Developer who can build a customized MT5 Expert Advisor for us. The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform. Skills required: - Strong understanding of
I need stochastic div (hidden &regular ea) that should perform task in all tf's ..divergence is a repaint stly so i want to use it with candlestick flips .. so bet for it

Informations sur le projet

Budget
200 - 500 USD
Pour le développeur
180 - 450 USD
Délais
de 7 à 14 jour(s)