30. Fibo Two Orders
The Expert Adviser for MetaTrader 5. The trading strategy of the bot is Fibo retracement after BOS or CHoCH using two pending orders.
- Created by Denis Kislitsyn | denis@kislitsyn.me | kislitsyn.me
- https://www.mql5.com/en/job/228450
- Version: 1.04
⚠️
The bot does not guarantee a profit. The bot does not guarantee 100% deposit protection. The bot can hold positions from a few minutes to several weeks.. Use the bot at your own risk.

What’s New
- 1.04: [+]: 'FIB_MD'=SWING&SWING update Fibo only if new Swing "breaks previous" one.
[+]: After STOP pos triggers SL LIMIT pos SL changes to STOP 1:1 SL.
[+]: Added 'ENT_ORD_DEL' input to leave orders in market after Fibo update.
- 1.03: [+] New 'FIB_MD'=SWING&SWING added. It's also changes Fibo dir using last swing updated.
- 1.02: [+] 'FIB_MD' adds Fibo's two modes: between BOS&CHoCH levels or between BOS&SWING levels.
- 1.01: [*] Removed tester property for MQ VPS.Installation
- Make sure that your MetaTrader 5 terminal is updated to the latest version. To test Expert Advisors, it is recommended to update the terminal to the latest beta version. To do this, run the update from the main menu
Help->Check For Updates->Latest Beta Version. The Expert Advisor may not run on previous versions because it is compiled for the latest version of the terminal. In this case you will see messages on theJournaltab about it. - Copy the bot executable file
*.ex5to the terminal data directoryMQL5\Experts. - Install free Structure Blocks indicator from MQL5 market. Sign in your MQL Community account inside your terminal. Enter
Structure Blocksin search field of the terminal. PressInstallbutton. - Open the pair chart.
- Move the Expert Advisor from the Navigator window to the chart.
- Check
Allow Auto Tradingin the bot settings. - Enable the auto trading mode in the terminal by clicking the
Algo Tradingbutton on the main toolbar. - Load the set of settings by clicking the
Loadbutton and selecting the set-file.
Requirements
Complete requirements are posted on the task page.
- The bot will have two entries.
- Use inputs
FIB_STP_EPL,FIB_LIM_EPLto set Entry point of each order. Other inputs set SL and TP. - The bot uses two different Fibo object:
- Fibo 1 for STOP orders.
- Fibi 2 for LIMIT orders.
- Use inputs
- When price breaks structure, a high/low structure, the bot starts plotting the fib for a possible 76.4 buy/sell stop
- The bot uses
Structure Blocksindicator to detect BOS and CHoCH using classic Smart Money way.
- The bot uses
- 76.4 order will be a buy/sell stop with SL at the 23.6 area and tp of 1:1 ratio
- Use
ENT_STP_RRinput to set another RR for STOP order.
- Use
- Second position will be a limit order at the 100.00 area… In an uptrend, price breaks a high, the aim of this entry is to catch reversals after there is a run on liquidity..
- Use
FIB_LIM_EPLinput to set Entry Point for LIMIT order.
- Use
- The SL of this position is going to be the equivalent of placing your 76.4 at the high/low (Ask questions on this SL part, I will send screenshots)
- The bot places Fibo2 on the chart so that level
FIB_LIM_EPLmatches level 100.0 of Fibo1.
- The bot places Fibo2 on the chart so that level
- The SL of this second position will be the TP of the first position
- Use
FIB_LIM_SLLinput to set another SL level.
- Use
- The second position will have TP set at 1:5
- Use
ENT_LIM_RR1input to set another RR.
- Use
- When the first position hit SL, the second position will move SL into a 1:1
- The bot changes TP for LIMIT pos using
ENT_LIM_RR2when STOP pos reaches SL. If the new TP is lower than the current price, the position simply closes on the market with the current profit. - The bot deletes LIMIT order when STOP pos reaches SL and LIMIT order is still open (WhatsApp chat: Once a the first order hit SL without triggering the second order, the second order becomes invalidated)
- The bot changes TP for LIMIT pos using
- A prototype must be ready within 14 day’s
- Bot must work across synthetic indices and forex pairs
- It must work across multiple timeframe
- ==The bot detect BOS/CHoCH and built Fibo only using
FIB_TFtimeframe on every new bar appears.== - You can change TF on your chart to have a best view, but detection BOS/CHoCH is always made on
FIB_TFtimeframe.
- ==The bot detect BOS/CHoCH and built Fibo only using
!!! warning WARNING Every time you change TF on the chart bot deletes orders and builds new Fibo object again. All open pos are ignored. So it’s not recommended to change TF while bot is running.
- It must be able to be turned off during rollover periods in forex
- You can stop the bot any time.
- Bot must have risk management settings
- Use
ENT_MMTandENT_MMVinputs.
- Use
- The presence of an ongoing trade should not prevent the bot from following the rules and placing new trades whenever the conditions are met
- The bot operates only orders and positions with Magic ID set in
MSC_MGCinput. Ant other orders and positions are ignored.
- The bot operates only orders and positions with Magic ID set in
- In the mode ‘FIB_MD’=SWING&SWING bot must rebuild Fibo only when current Swing “breaks” previous.
- When STOP pos hit SL the bot changes LIMIT pos SL to equal value of STOP pos.
- Orders should remain in the market after the Fibo updates.
Bot’s inputs

1. FIBO (FIB)
-
FIB_MD: Mode:-
Fibo between BOS & CHoCH -
Fibo between BOS & SWING -
Fibo between SWING & SWING
-
-
FIB_TF: Timeframe to detect BOS/CHoCH and Fibo -
FIB_STP_EPL: STOP order EP Level -
FIB_STP_SLL: STOP order SL Level -
FIB_LIM_EPL: LIMIT order EP Level -
FIB_LIM_SLL: LIMIT order SL Level -
FIB_COL_BUY: Color Buy -
FIB_COL_SELL: Color Sell
2. ENTRY (ENT)
-
ENT_STP_RR: STOP Order TP RR -
ENT_LIM_RR1: LIMIT Order TP RR -
ENT_LIM_RR2: LIMIT Order TP RR after STOP order SL -
ENT_ORD_DEL: Delete orders when Fibo’s updated -
ENT_MMT: Money Management Type:Fixed lot: Lot size is fixed with value fromENT_MMVinputFixed max loss: The bot calculates lot size of every order and position to make max loss in account currency set inENT_MMVinput% of Balance: The bot calculates lot size of every order and position to make lot size cost equal % of your Balance in account currency% of Equity: Same as Balance but base is Equity% of Free Margin: Same as Balance but base is Free MarginAuto (limit % of risk): The bot calculates lot size of every order and position to make max loss not more than % of your Balance in account currency
-
ENT_MMV: Money Management Value
3. MISCELLANEOUS (MSC)
-
MSC_MGC: Expert Adviser ID - Magic -
MSC_EGP: Expert Adviser Global Prefix -
MSC_LOG_LL: Log Level