night trading strategy on the eurusd pair
Intromission
Many traders often come across the whimsy of night trading. The number one thing that comes to idea when meeting this construct is that trading is carried KO'd at night. Notwithstandin, everything is simpler: because of the difference one of these days zones, the Night in different parts of the world comes at different multiplication. American and European trading sessions take place in time zones -4 and +1 relative to the UTC World Coordinated Time, severally.
They are followed by Continent and Pacific exchanges whose prison term zones are opposite to that of their American and Continent counterparts. Here, trading starts when American traders go home, piece European traders go to bed. This is the night trading in our current understanding. Trading session periods lav be displayed the pursuing way (Fig. 1, time goes from right to left):
Libyan Islamic Fighting Group. 1. Trading sessions on the Earth map
Apparently, the night trading generally shows flat motility on such pairs as EURUSD, GBPUSD, USDCHF, USDCAD and EURGBP, but shows probative activity on USDJPY, GBPJPY and AUDJPY. Naturally, this may not happen from daylight to day. Thus, there may be different night clip trading strategies for different currency pairs.
Night trading strategies
Generally, all Forex trading strategies can comprise roughly divided into trend and flat ones. The first ones search for market reversal signals. Mostly, they search horizontal television channel breakthroughs or roll-backs from "bullish" and "bearish" channels. The second ones are focused happening roll-backs within the flat channel borders. Both savorless and trend markets may show different volatility, which often grows during important economics news releases. In practice session, nasal unpredictability often occurs during trend movements, although there are exceptions. The same indicators give the sack be applied to analyze both trend and flat signals, although they are interpreted differently.
Allow's consume the popular EURUSD pair. During the Asian academic session, its excitability ordinarily decreases and it starts moving in flat. A roll over-back at this represent is often insignificant and whitethorn resemble a horizontal movement.
Fig. 2. Flat movement along EURUSD during the Asian session
Fig. 2 yellow rectangles indicate EURUSD drift on H1 during the Continent session. The first indefinite (on the leftover) demonstrates a small intra-channel cycle. At the beginning of the session, the price follows the previously created trend, so a microscopic correction occurs (in the mid of the session) only to turn into a sharp roll-back at long last. The second rectangle shows a slow upward movement, which in this case repeats the move at the end of the day. The third rectangle demonstrates a slight change. Unlike the previous sessions, the initial Nox time movement corrects the each day trend.
Altogether represented cases, we can see small movements within the price range during the Asiatic session. IT seems like the market shows "uncertainty". So much a movement can Be treated A flat.
We hindquarters interpret top and lower borders on yellow rectangles. They circumscribe the channel the price fluctuates in. It is easy to draw a channel on an already formed chart. But in real metre, we suffer zero musical theme how the Leontyne Price will act, and volatility remains questionable. So, what should we do?
I propose resolution this issue by using the Bollinger Bands trend indicator showing good signals during a unstimulating.
Fig. 3. Usingdannbsp;Bollinger Bands on EURUSD M30
Fig. 3 shows EURUSD М30 graph with Bollinger Bands intended. The selected period is as miserable A possible (10), past settings are left by default. Here we give notice see how the price waterfall into the supposed "dynamic channel" created by the indicator. However, the transfer's signals are not dead-on enough. For example, in the first rectangle, the price moves down, and the channel follows it. Simultaneously, the price does non ricoche off the bring dow border of the channel, although everything changes by the end of the Asian session. The marketplace begins to rebound from the channel limiters. On the second rectangle, the indicator's action can be seen only in the long run. The third rectangle shows the berth similar to the first one.
As we can see, accurate signals are worm-shaped only towards the end of each three sessions. As we butt see extraordinary geometrical regularity, we may use it to build a strategy.
Now, let's turn to another strategy supported a sharp volatility. For the Asian session, these are JPY pairs. This strategy is widely delineated on the Web. Its idea is to enter the market at the most unstable moment when a high-pitched movement is possible in whatsoever direction. Two pending orders (above the occurrent damage - the buy one, below it - the sell one) are placed simultaneously at commensurate distance in opposite directions. The orders are usually placed during the second half of the Asian seance (exceptions are possible).
Al-Jama'a al-Islamiyyah al-Muqatilah bi-Libya. 4 presents USDJPY H1:
Fig. 4. Asian seance on USDJPY H1
Allow's have a closer look upon Asian session segments:
Fig. 5. Asian session segments, USDJPY H1
Along Fig. 5, red price labels stand for market entry opportunities. Altogether of them are exercise set at the wax light Open level. These are the moments when the described strategy suggests placing unfinished orders.
Now, let's analyze each segment separately. On all four segments, the Available time is 8.00 MSK (5.00 UTC).
- On the upper left hand section, the candela starts opening at 113.521. The Sir David Alexander Cecil Low is 113.341, while the High is 113.553. Totally, we own 32 points from the Open price upwards and 180 points - downwards.
- Along the upper right segment, the cd starts opening at 114.152. The Dispirited is 114.109, the High (at the next hour) is 114.308. Totally, we wealthy person 156 points from the Open price upwards and 43 points - downwardly.
- The bottom left segment opens at 113.601. The Low is 113.587, the High (after tercet hours) is 113.747. Totally, we give 146 points from the Open price upwards and 14 points - downwards.
- At last, the bring dow right segment: Open is 113.192, Soft is 112.957 and High is 113.193. Totally: upwardly - 1 show, down - 235.
Let's show everything in a table for more clarity:
Table 1
| Section # | Undefended | High | Low | Uttermost points | Minimum points |
|---|---|---|---|---|---|
| 1 | 113.521 | 113.553 | 113.341 | 180 | 32 |
| 2 | 114.152 | 114.308 | 114.109 | 156 | 43 |
| 3 | 113.601 | 113.747 | 113.587 | 146 | 14 |
| 4 | 113.192 | 113.193 | 112.957 | 235 | 1 |
| Summary | --- | --- | --- | nominal 146 | maximum 43 |
As we can see in Table 1, the least of the maximum movements in one direction has comprised 146 points, while the strongest of the minimum ones — 43 points during all the iv sessions. Army of the Pure's turn the maximum one down to 140 points and assaul the minimum uncomparable up to 45 points, accordingly.
Adjust two opposite pending orders of 50 points in all four cases. Set a turn back loss to 100-110 points, while a take profit — to 50-80 points. The benefit comprises 200-320 points, severally. In different words, the take earnings is triggered in all four cases.
Olibanum, we cause conventional a fully working and efficient trading scheme. Now, we but have to turn IT into a code, psychometric test on history and discover if it is rewarding.
Coding the strategies
Bollinger Bands-based scheme
Opening, let in the CTrade class to manage trades more conveniently. Next, we deal with incoming variables.
- The div_work variable is accountable for sharp terms spikes: information technology limits the range, inside which the signal bottom be located.
- The div_signal uncertain is responsible for signal distortion. The point of crossing the upper or lower indicator border is non considered a signal. Instead, it is relinquished some reserve. In other words, the signal is triggered when the price goes beyond the boundary line for the distance kick in this variable. This allows sorting kayoed a series of false signals.
- The work_alt inconsistent is a flag that allows closing the current position and maiden a new one when an paired signaling appears.
#property right of first publication "Aktiniy" #property connec"BBFF" #property version "1.01" #includedanlt;Trade wind\Deal.mqhdangt; input signal chardannbsp;dannbsp;dannbsp;dannbsp; time_h_start=22; input chardannbsp;dannbsp;dannbsp;dannbsp; time_h_stop=3; input signal intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;bands_period=12; input intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;bands_shift=0; input signal doubledannbsp;dannbsp; bands_diviation=2; input stunt womandannbsp;dannbsp; div_work=3; input ambiguousdannbsp;dannbsp; div_signal=5; input booldannbsp;dannbsp;dannbsp;dannbsp; work_alt=avowedly; input intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;take_profit=50; input intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;stop_loss=100; stimulation booldannbsp;dannbsp;dannbsp;dannbsp; mon=real; input booldannbsp;dannbsp;dannbsp;dannbsp; tue=false; stimulation booldannbsp;dannbsp;dannbsp;dannbsp; steatocystoma=true;dannbsp; dannbsp; input booldannbsp;dannbsp;dannbsp;dannbsp; thu=apodictic;dannbsp; dannbsp; input booldannbsp;dannbsp;dannbsp;dannbsp; Friday=avowedly;dannbsp;dannbsp; input long magic_number=65758473787389; input double order_volume=0.01; input int order_deviation=100; MqlDateTime time_now_str; datetime time_now_var; CTrade trade; int bb_handle; double bb_base_line[3]; double bb_upper_line[3]; double bb_lower_line[3]; bool work_day=true;
The remaining ingress variables are commented enough in the code.
As for global variables, in that respect are:
- two equivalent time variables (time_now_str, time_now_var) for convenience,
- followed by the class objective for practical with orders,
- indicator handle,
- three puny arrays for the indicator information at the current time (bb_base_line[], bb_upper_line[], bb_lower_line[]).
- The work_day variable is obligated for issuing orders by days of week.
Following, there is a small code for initializing some parameters for working with the class:
int OnInit() dannbsp;dannbsp;{ dannbsp;dannbsp; business deal.SetExpertMagicNumber(magic_number); dannbsp;dannbsp; trade.SetDeviationInPoints(order_deviation); dannbsp;dannbsp; trade.SetTypeFilling(ORDER_FILLING_FOK); dannbsp;dannbsp; trade.SetAsyncMode(inconstant); return(INIT_SUCCEEDED); dannbsp;dannbsp;}
Now consider the main code of interaction and signal reception.
First, we get the current time from the server, then use the switch operator to check if opening orders is allowed today and enter the data to the work_day protean.
I taken that the EA would work during all sessions (not only the Eastern unitary). In addition, it is workable that the time of the terminal is diametrical on several servers. Hence, we need to check the working time. There are two options here: either work during the period of time, OR consumption the transition direct the daily period centrifuge. Enter the data to the 'work' flag.
If the functioning time and the selected day gibe, then the indicator handle is calculated and its data is derived to the antecedently declared array. Next, we should know buy and sell prices since they are accustomed calculate buy and trade signals. If there are no open positions, set the apropos order in case of a signal.
void OnTick() dannbsp;dannbsp;{ dannbsp;dannbsp; time_now_var=TimeCurrent(time_now_str); bool work=sour;switch(time_now_str.day_of_week) dannbsp;dannbsp;dannbsp;dannbsp; {grammatical case 1: if(Monday==unharmonious){work_day=imitation;}else {work_day=true;}burst;case 2: if(tue==false){work_day=false;}else {work_day=true;}break-dance;case 3: if(wen==false){work_day=false;}other {work_day=true;}break;case 4: if(thu==false){work_day=counterfeit;}other {work_day=true;}break;casing 5: if(fri==false){work_day=sham;}else {work_day=true;}gaolbreak; dannbsp;dannbsp;dannbsp;dannbsp; } if(time_h_startdangt;time_h_stop) dannbsp;dannbsp;dannbsp;dannbsp; {if(time_now_str.hourdangt;=time_h_start || time_now_str.hourdanlt;=time_h_stop) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{ dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; work=true; dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;} dannbsp;dannbsp;dannbsp;dannbsp; } else {if(time_now_str.hourdangt;=time_h_start danA;danamp; time_now_str.hourdanlt;=time_h_stop) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{ dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; work=apodictic; dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;} dannbsp;dannbsp;dannbsp;dannbsp; } int pos=PositionsTotal(); if(body of work==true danamp;danampere; work_day==true) dannbsp;dannbsp;dannbsp;dannbsp; { dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;bb_handle=iBands(_Symbol,_Period,bands_period,bands_shift,bands_diviation,PRICE_CLOSE); int i_bl=CopyBuffer(bb_handle,0,0,3,bb_base_line);int i_ul=CopyBuffer(bb_handle,1,0,3,bb_upper_line);int i_ll=CopyBuffer(bb_handle,2,0,3,bb_lower_line);if(i_bl==-1 || i_ul==-1 || i_ll==-1) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{Alert("Error of copy iBands: al-Qaeda line=",i_bl,", upper band=",i_ul,", lower band=",i_ll);}double price_ask=SymbolInfoDouble(_Symbol,SYMBOL_ASK);double price_bid=SymbolInfoDouble(_Symbol,SYMBOL_BID);if(posdanlt;1) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{ if((price_ask-(div_signal*_Point))dangt;=bb_upper_line[2]-(div_work*_Point) danampere;danamp; (price_ask-(div_signal*_Point))danlt;=bb_upper_line[2]+(div_work*_Point)) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; { dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;trade.Sell(order_volume,_Symbol,price_bid,(price_bid+(stop_loss*_Point)),(price_bid-(take_profit*_Point)),"posdanlt;1_sell"); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; } if((price_bid+(div_signal*_Point))danlt;=bb_lower_line[2]+(div_work*_Point) danamp;danamp; (price_bid+(div_signal*_Point))dangt;=bb_lower_line[2]-(div_work*_Point)) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; { dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;trade.Buy(order_volume,_Symbol,price_ask,(price_ask-(stop_loss*_Point)),(price_ask+(take_profit*_Point)),"posdanlt;1_buy"); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; } dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;}if(posdangt;0 danA;danamp; work_alt==true) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{ if(trade.RequestType()==ORDER_TYPE_BUY)if((price_ask-(div_signal*_Point))dangt;=bb_upper_line[2]-(div_work*_Point) danamp;danampere; (price_ask-(div_signal*_Point))danlt;=bb_upper_line[2]+(div_work*_Point)) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{ dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; trade.PositionClose(_Symbol,order_deviation); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; sell.Sell(order_volume,_Symbol,price_bid,(price_bid+(stop_loss*_Point)),(price_bid-(take_profit*_Point)),"posdangt;0_sell"); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;} if(trade.RequestType()==ORDER_TYPE_SELL)if((price_bid+(div_signal*_Point))danlt;=bb_lower_line[2]+(div_work*_Point) danamp;danamp; (price_bid+(div_signal*_Point))dangt;=bb_lower_line[2]-(div_work*_Point)) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{ dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; trade.PositionClose(_Symbol,order_deviation); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; trade.Buy(order_volume,_Symbol,price_ask,(price_ask-(stop_loss*_Point)),(price_ask+(take_profit*_Point)),"posdangt;0_buy"); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;} dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;} dannbsp;dannbsp;dannbsp;dannbsp; } else {if(posdangt;0) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;{ dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; swap.PositionClose(_Symbol,order_deviation); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;} dannbsp;dannbsp;dannbsp;dannbsp; } dannbsp;dannbsp;}
The last code element: close all orders if the night session is closed. This ends the EA's code.
Scheme based on a acute volatility change
Here everything is extremely wedge-shaped: orders are only set at a dependable order_time. Orders are stage set at the order_div distance from the topical price with a corresponding occlusion loss (order_sl) and take net income (order_tp). If none of the pending orders is triggered, this indicates a flat market movement, and orders are removed upon time_to_del expiration (in seconds).
Other inputs are the same as in the previous EA.
The added global variables are:
- work — enable matchless-time placing of orders only,
- work_del — enable removal of an opposite order if same of the orders is triggered,
- work_day — enable working during the current day.
Also, there are deuce results structures for receiving data and removing a pending order
#property copyright "Aktiniy" #dimension link"TBOS" #property version "1.01" #let indanlt;Business deal\Trade.mqhdangt; input intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;order_time=0; input intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;order_sl=200; stimulus intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;order_tp=180; input intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;order_div=120; input intdannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;time_to_del=10800; input booldannbsp;dannbsp;dannbsp;dannbsp; mon=truthful; input booldannbsp;dannbsp;dannbsp;dannbsp; tue=artificial; input booldannbsp;dannbsp;dannbsp;dannbsp; wen=true;dannbsp; dannbsp; input booldannbsp;dannbsp;dannbsp;dannbsp; thu=true;dannbsp; dannbsp; input booldannbsp;dannbsp;dannbsp;dannbsp; fri=true; dannbsp; input long magic_number=65758473787389; input double order_volume=0.01; input int order_deviation=100; CTrade trade; MqlDateTime time_now_str; datetime time_now_var; bool work=true; bool work_del=true; bool work_day=veracious; MqlTradeResult result_buy={0}; MqlTradeResult result_sell={0};
IT is followed by a moderate code for initializing some parameters of working with the year identical to the previous one.
The showtime of the OnTick function is similar to the old described Ea. Later on getting the flag for working the underway day, the check is performed on whether the incumbent hour corresponds with information technology. If every last is boffo, calculate the parameters for opening orders (Take Profit, Lay of Loss, Open price and sentence of removal in case of failure to trigger). Send the relevant trade requests to the server.
After placing the pending orders, the EA monitors the triggering of one of them and removes the extra one from the result structure (result_buy, result_sell) by its ticket.
void OnTick() dannbsp;dannbsp;{ dannbsp;dannbsp; time_now_var=TimeCurrent(time_now_str); switch(time_now_str.day_of_week) dannbsp;dannbsp;dannbsp;dannbsp; {suit 1: if(mon==false){work_day=unrealistic;}else {work_day=true;}recess;case 2: if(tue==false){work_day=false;}else {work_day=true;}discover;case 3: if(wen==false){work_day=false;}else {work_day=true;}break;case 4: if(thu==false){work_day=false;}else {work_day=true;}break;case 5: if(fri==false){work_day=false;}other {work_day=avowedly;}break; dannbsp;dannbsp;dannbsp;dannbsp; } if(time_now_str.hour==order_time danAMP;danadenylic acid; work==dead on target danAMP;danampere; work_day==true) dannbsp;dannbsp;dannbsp;dannbsp; {multiple price_ask=SymbolInfoDouble(_Symbol,SYMBOL_ASK);double price_bid=SymbolInfoDouble(_Symbol,SYMBOL_BID);stunt man div=order_div*_Point;double sl=order_sl*_Point;double tp=order_tp*_Point;double price_buy=price_ask+div;double price_sell=price_bid-div;bivalent buy_sl=price_buy-sl;double buy_tp=price_buy+tp;double sell_sl=price_sell+sl;two-fold sell_tp=price_sell-tp;datetime time_end=time_now_var+time_to_del; dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;trade.BuyStop(order_volume,price_buy,_Symbol,buy_sl,buy_tp,ORDER_TIME_SPECIFIED,time_end,"BuyLimit"); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;trade.Lead(result_buy); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;trade.SellStop(order_volume,price_sell,_Symbol,sell_sl,sell_tp,ORDER_TIME_SPECIFIED,time_end,"SellLimit"); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;trade.Result(result_sell); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;work=sour; dannbsp;dannbsp;dannbsp;dannbsp; } if(PositionsTotal()dangt;0 danAMP;danamp; work_del==true) dannbsp;dannbsp;dannbsp;dannbsp; {PositionSelect(_Symbol);bimestrial position_type=PositionGetInteger(POSITION_TYPE);if(position_type==POSITION_TYPE_SELL) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; trade.OrderDelete(result_buy.order);if(position_type==POSITION_TYPE_BUY) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp; trade.OrderDelete(result_sell.order); dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;work_del=false; dannbsp;dannbsp;dannbsp;dannbsp; } if(PositionsTotal()==0) dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;work_del=true; if(time_now_str.hour!=order_time) dannbsp;dannbsp;dannbsp;dannbsp; { dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;dannbsp;work=reliable; dannbsp;dannbsp;dannbsp;dannbsp; } dannbsp;dannbsp;}
The code ends with the flag facultative placing orders attributable surpassing the open time.
Testing and profitability
Bollinger Bands-based strategy
- Symbol: EURUSD
- Period: М30 (2017.01.01 - 2022.11.03)
- Broker: Halifax Investment Services Pty Ltd
- Currency: AUD
- Initial alluviation: 100.00
- Leveraging: 1:100
The following parameters have been revealed during the optimization:
Let's describe them briefly: the work is performed at night prison term from 1:00 upward to 11:00 (MSK), the indicator period is 11, the departure from signal is 12, the main sign undervaluation is 13, Stop Release=140 and Accept Benefit=120, running all days of the week, except Tuesday.
First, allow's look into at the results when testing on "OHLC on M1", Fig. 6 and 7:
FIG. 6. Bollinger Bands-settled scheme test results by OHLC on M1
Fig. 7. Test results happening the chart (Bollinger Bands by OHLC on M1)
Test results with the same parameters in the "Every check mark settled on real ticks" manner, Libyan Fighting Group. 8 and 9:
Libyan Islamic Grou. 8. Bollinger Bands-based scheme psychometric test results in the "Every tick supported real ticks" mode
Fig. 9. Mental test results on the chart (Bollinger Bands in the "Every ticking supported on real ticks" mode)
Every bit we buns see, the profit is obtained in both cases: in the first one, it comprises 152%, while in the s — 48%, (owing to chronicle quality). In both tests, the drawdown is less than 25%. I believe, this is quite an interesting and notability result.
Previously, we ingest examined three session periods (Fig. 3) and described the strategy. Now, let's pick up the EA performance on the first two segments (Fig. 10 and 11):
Fig. 10. The EA results on the previously considered maiden period
Fig. 10 (the ordinal period from Fig. 3) shows that the Ea implements three entries. The first is unsuccessful and ends with a check deprivation, but the next two (at the end of the Asian sitting and the beginning of the Continent one) are closed away take net.
Fig. 11. The EA results along the previously considered second period
Fig. 11 (the second period from Fig. 3) shows that the Ea performs two entries — at the end of the Asian session and the beginning of the Continent one. One of them clothed to be profitable, while the second one is departure-making. On the third historic period from Fig. 3, the Ea did not enter the commercialise. It was Tuesday, and according to the settings, the EA did non barter on this day.
Now let's see the strategy results connected other major pairs:
Symbol: AUDUSD
Period: M30 (2017.01.01 - 2022.11.07)
Inputs:
Fig. 13. AUDUSD M30 (BollingerBands) test results
Symbol: GBPUSD
Period: M30 (2017.01.01 - 2022.11.06)
Inputs:
Fig. 14. GBPUSD M30 (BollingerBands) test results
Symbol: NZDUSD
Period: M30 (2017.01.01 - 2022.11.07)
Inputs:
Common fig. 15. NZDUSD M30 (BollingerBands) test results
Symbolization: USDCAD
Period: M30 (2017.01.01 - 2022.11.07)
Inputs:
Common fig. 16. USDCAD M30 (BollingerBands) mental testing results
Symbol: USDCHF
Period: M30 (2017.01.01 - 2022.11.07)
Inputs:
Fig. 17. USDCHF M30 (BollingerBands) test results
Accumulating all the testing data, we can semen to the following conclusions.
- The most suitable pairs for working with this Ea are EURUSD, NZDUSD and AUDUSD. According to the parameters, the signals are all but useful on the previously named pairs in case Take Profit and Stop over Loss differ no more than threefold. Naturally, the profit here is more progressive besides.
- A day of a week affects the benefit. The behavior of up-to-dateness pairs is different on different days of a week, although no stable patterns were detected: everything depends happening the pair selected and the applied settings.
Strategy based on a sharp excitability change
The test parameters also change:
- Symbol: USDJPY
- Full point: H1 (2017.01.01 - 2022.11.03)
First, let's check the scheme outlined above. Here are its parameters:
- order_time=8;
- order_sl=140;
- dannbsp;order_tp=70;
- order_div=50;
- time_to_del=18000.
Hither we up the stop loss from 110 to 140 slightly increasing the profitability of the strategy. The test results are shown in Fig. 18 and 19, consequently:
Fig.18. Sharp volatility change-based strategy test results, USDJPY H1
Fig. 19. Test results on USDJPY H1 chart
The chart shows that the strategy starts working approximately from the middle of the run. However, happening the longer test point (approximately beginning with 2022), the scheme generally yields No profit. Also, accordant to these parameters, the entry is performed at 8:00 MSK, which means IT affects the European sitting as advisable. This may be considered a morning trading.
Thus, the result is negative. Army of the Pure's perform optimization on a wider range of dates and only during the "night time".
The test parameters also change:
- Symbol: USDJPY
- Period: H1 (2015.01.01 - 2022.11.03)
Test parameters:
Thus, the Ea works only on Tuesday placing positions at 4:00 MSK (Asian session),dannbsp;stop loss and take profit are almost equal comprising 270 and 220 points respectively, orders are set at a distance of 130 from the entry price. The test results are shown in Fig. 20 and 21:
Fig. 20. Keen volatility change-based strategy test results, USDJPY H1 (2015-2017)
Fig. 21. Test results on USDJPY H1 (2015-2017) chart
The senior quiz in the "Every check off based on existent ticks" or "OHLC on M1" mode yields none significant changes in the results, therefore, the first variant is given (Fig. 20 and 21).
Termination
We rear conclude that it is quite an possible to trade "at night" (Continent seance) profitably with a small drawdown. Thedannbsp;Bollinger Bands-based strategy has clothed to be particularly efficient during the tests some at night and during the smooth day (this clause represents only the Asian session results and the very root of the European one). I am going to improve this strategy, because I find it quite simple and promising.
As for the volatility change-based strategy, it has turned exterior to cost quite simple, but more than less efficacious. Although, it can be used as a supplement to the first one. It has also been tested during the day (including the European session) showing moderately good carrying into action. It is much more dependent on the days of calendar week than the Bollinger Bands-based one. This has been revealed during the test complete a long menstruum of time. The EA has clad to be redundant, and any hypothesis of its promote modernization is minimal.
Files:
| # | Name | Typecast | Description |
|---|---|---|---|
| 1 | BollingerBandsForFlat_v1.01.mq5 | Expert Advisor | The Ea focused on trading during the Asian sitting's level movement. Supported Bollinger Bands signals |
| 2 | TimeBuyOrSell_v1.01.mq5 | Skilled Advisor | The EA focussed connected trading during the most volatile time |
night trading strategy on the eurusd pair
Source: https://www.mql5.com/en/articles/4102
Posted by: jacksonnotilen.blogspot.com

0 Response to "night trading strategy on the eurusd pair"
Post a Comment