USER MANUAL for "Midnight Shark".

USER MANUAL for "Midnight Shark".

16 January 2022, 18:53
Nauris Zukas

"4you Trading Robots"

USER MANUAL for "Midnight Shark".


1. How to attach EA to chart.

2. How to include News Calendar.

3. Parameters

4. Requirements

5. Trading Strategy and my experience.


1. How to attach EA to chart.

1.1. Just drag and drop the file to chart and make a smiley face.

1.2. Choose your Lot Sizing Method.

1.3. The EA must be attached to EURUSD M5 time frame charts.


2. How to include News Calendar.

2.1. Please allow web requests and add this URL:

3. Parameters

=INFOPANEL SETTINGS====================

Short Name - name will be needed if you use many different settings for different accounts. A short name can help you fast identify the selected set. For example - Midnight Shark Best Pairs;

ShowDetailTradingTime – allow seeing the start and end trading time in Broker time (terminal time), GMT time, and Local time (computer time);

HideTestInfo – Info Panel spends pretty much resources to recalculate and redraw info. You can hide the Info Panel and this will improve testing speed.

=TIME SETTINGS============================

GMT Offset Method – select GMT Offset Method. Auto GMT Offset work only in live trading. In the Tester mode, GMT Offset Method will always be in Manual GMT Offset mode.

ManualGMTOffset – GMT difference between broker Market Watch (terminal) and current Greenwich Mean Time.

BeginGMT – Beginning of the trading session, based on GMT.

EndGMT – End of the trading session, based on GMT.

MondayTrading – Allow to trade after the weekend.

FridayTrading = false – Allow to trade before weekend.

=ENTRY SETTINGS===============

AddPointsToEntryLevel – Add or subtract points to entry-level.

AddRandomPointsToEntryLevel – Range for Add or subtract randomize points to entry-level.

OpenPositionInstantly – Position will open instantly if, the price will be outside of the sup/res line channel. Otherwise limit orders will open on the sup/res line when the price will be inside the channel. 

=SL/TP SETTINGS===============

AddPointsToTP – Add or subtract points to TP level.

OnlyMinimumTP – Position close only if profit will be more than OnlyMinimumTP points.

ResetMinimumTPHours – OnlyMinimumTP restriction will be reset after ResetMinimumTPHours, Position will be closed to other conditions.

TraderStoploss – Traders can choose their own Stop Loss for all currency pairs.

AddPointsToStopLossInRolloverTime – Points to increasing Stop Loss during rollover time.

MinPointsToCloseAll – Minimum profit points, to close all trades after AlowedTradeHours (restriction).

=SWAP SETTINGS========================

SwapFiltr – turn ON/OFF swap filter.

  1. Triple Swap Day – trades will not be allowed before triple swap time.
  2. All days – trades will not be allowed before all swap time.


SpreadToStopOpenLimitOrdersPoints – Maximum Spread for place limit orders.

SpreadToDeleteLimitOrdersPoints – Spread for delete limit orders.

MaxOpenPositionsAndOrders – Maximum of open positions and orders;

PositionsOpenSameTime – Maximum open positions (all limit orders will be deleted).

SymbolDirectionControl - allows limiting the number of open positions with the same currencies in the same direction. 0 – control off.

ConTradeDelay - Minimum minutes between 2 consecutive trades in the same direction

AlowedTradeHours – Hours after EndGMT, then positions will be closed (if no other conditions).

Magic - distinguishes the open positions of Trading Robots from the open positions of other Trading Robots;

=CALCULATION OF LOT SIZE================

Lot Sizing Method* - select the lot sizing method according to the risk you want to take;

Fixed Lot – the fixed size of trade positions;

AccountBalanceStep – definite step to calculate lot size from account balance;

Deposit load % - value for adjusting your own initial lot size.

=ROLLOVER SETTINGS========================

RolloverBeginGMT – Beginning of the rollover time, based on GMT.

RolloverEndGMT – End of the rollover time, based on GMT.

RolloverTrade – True – allow orders during rollover time. False – orders will be deleted during rollover time.


One Chart Setup Pairs – list of selected pairs to trade.

=NEWS SETTINGS===============

NewsOff – Turn ON/OFF News filter. False – News filter enabled. True - News filter disabled.

AvoidHighImpactNews – Avoid trading during High Impact News events.

AvoidMediumImpactNews – Avoid trading during Medium Impact News events.

AvoidLowImpactNews – Avoid trading during Low Impact News events.

Wait Minutes Before News Event – trading will not allow before news (mark red).

Wait Minutes After News Event – trading will not be allowed after the news (mark red).

(News Filter not working in test mode.)

*Lot Sizing Method

  1. Fixed Lot - will use always fixed lot;
  2. Account Balance Step - EA uses minimum lot size for the definite step. Example: if broker minimal lot size is 0.01 and Account Balance is 750, then EA open 0.03 lots if AccountBalanceStep=250;
  3. Lots based on Deposit load % – lot-size based on account equity and margin requirement.


Slippage Panel ON – Turn ON/OFF Slippage Panel.

Columns Total – set your count of columns.

Rows Total – set your count of rows.


1. "UPDATE SLIPPAGE" - when the position is closed it can be processed for slippage calculation. In this case button "UPDATE SLIPPAGE" allows you to force run all slippage recalculation processes.

2. "Show Open/Close Time" - this button allows you to switch to time mode. To save space, time will not show the year and it will appear in this format: hour:minute:second.

3. "OPEN NR  CLOSE NR" - to make it easier to navigate on the open and close events, positions open and close are arranged and numbered. Also need to take into account, that the positions are sorted in the table by closing time - number 1 always will be the last closed position, the penultimate closed position will be number 2, and so on.

4. "ALL SLIPPAGE" - there you can see the summary of all slippages for this symbol. Green is positive slippage, red negative. "ALL SLIPPAGE" result does not impact the count of columns, for example, if you have 20 closed positions for a symbol, but you have only 10 visible columns, then anyway will appear a summary of all 20 closed positions.


How to work with slippage monitoring?

  • Need to collect data, saving positions actions. This process will start automatically with the new version of this EA.
  • Collected data will be compared with MT platform Account History and the slippage calculation process can begin.

In view of the above, you can set your own monitoring time by choosing a period of "Account History" and you will see slippage for this period (sure, if you have collected data).


*All parameters are optimized and ready to use, just choose your Lot Sizing Method or use set file (attachment).


4. Requirements

  • Timeframe: M5;
  • The EA is sensitive to spread and slippage. I advise using a good ECN broker;
  • The EA should run continuously;


5. Trading Strategy and my experience.

EA starts trade from 1 hour before rollover time, till 1 hour after rollover time. This is the time when liquidity is low and price movement occurs frequently in the narrow trading channel. In this case, the best strategy is to trade between support/resistance lines (EA uses Bollinger Bands). The minus of this strategy is large slippage (because of low liquidity) and broker restrictions. Brokers are not happy with this strategy and always try to restrict profit, some brokers do this in a legal way (changing liquidity providers near rollover time), but some brokers are not so tolerant and even can prohibit withdrawal profit. This is an old strategy and personally, I was use it more than 10 years ago and I can share my experience. Those difficulties with brokers forced me to end, use this strategy. I'm surprised right now, is how much money can be demanded for such a weak strategy, as all the most valued sellers do today. Below I will list how to get the most out of this strategy.

5.1. Find the broker with a low spread (better ECN broker);

5.2. Read broker “Client Agreement” for specific trading restrictions;

5.3. Use several brokers for diversification;

5.4. Use small Lot size;

5.5. Withdraw profit often (if broker begin to prohibit withdraw profit, you will not lose too much);

5.6. If the broker starts working against you – change broker. (Dramatic result change can recognize, if brokers work against you. Also, comparisons with other broker results can help you.)

5.7. Use the most liquid pairs with the least slippage, for example, EURUSD, GBPUSD and EURCHF;

5.8. Demo with real trading can be quite different, but the demo is the first opportunity to consider which pairs will be used in real trade. There you can take a look at demo account monitoring, and using Analyze find the best pairs: (can't attach the direct link to the source, please ask me in a private message).

5.9. Perceive this strategy as small regular income, but not as become to millionaire. I add 20 activations and if you find at least 5 good brokers, income will be much more pleasant.

5.10. Remember, strategy is not sustainable, as more people use this strategy as more possibilities to get a bad entry and exit price.

Good Luck!