Trading Bitcoin requires more than watching the price move. Before entering a trade, you need to understand the market direction, identify relevant price levels, wait for confirmation, and decide whether the potential reward justifies the risk.
For traders in Pakistan, another practical challenge is timing. MetaTrader 5 may display your broker’s server time rather than Pakistan Standard Time, making candle closes and trade alerts less convenient to interpret.
The BTCUSD PKT Advisor was designed to bring these checks together in a single-file tool that runs inside MetaTrader 5.
It reads your broker’s BTCUSD price feed, recalculates support and resistance, checks closed-candle setups, and displays its alerts in Pakistan time, UTC+5.
Most importantly, it is an advisory tool—not an automated trading robot.
Important risk notice: This advisor does not guarantee accurate predictions or profitable trades. Bitcoin is volatile, and leveraged trading can cause significant losses. Test the tool on a demo account before using its prompts to support real-money decisions.
What Is the BTCUSD MT5 Advisor?
The BTCUSD MT5 advisor is a native MetaTrader 5 Expert Advisor, supplied as a single .mq5 source file.
Although MT5 classifies it as an Expert Advisor, this particular program does not place orders. Instead, it monitors market conditions and presents one of three main states:
- WAIT / NO NEW TRADE
- BUY SETUP / REVIEW NOW
- SELL SETUP / REVIEW NOW
When a setup satisfies the configured rules, the advisor displays:
- A reference entry price
- A proposed stop-loss level
- A proposed take-profit target
- The current reward-to-risk ratio
- A Pakistan-time alert timestamp
- The time when the review prompt expires
A setup alert means the programmed conditions have been met. It does not mean the trade is certain to succeed.
From TradingView Analysis to a Live MT5 Tool
The idea began with a common trading workflow: inspect BTCUSD charts on TradingView, identify the direction of the market, mark important levels, and outline conditional trades.
For example, a trader might watch for:
- A rebound into resistance followed by rejection
- A break below support followed by a failed retest
- A bullish reclaim that changes the short-term outlook
- A situation where waiting is better than entering
However, a manual chart review is only a snapshot. Prices, spreads, and market structure continue changing after the analysis is written.
Another issue is the price feed. A TradingView BTCUSD chart and your broker’s BTCUSD instrument may show different quotes, candle shapes, and spreads.
The MT5 advisor addresses this by using your broker’s own market data.
It does not permanently reuse the prices from an earlier TradingView analysis. It recalculates levels from the candles available in your MT5 terminal.
Is the Advisor AI-Powered?
No. The current version is a deterministic, rule-based program.
Its logic is inspired by the chart-analysis workflow, but it does not contain a continuously running AI model, connect to ChatGPT, or independently interpret financial news.
This distinction matters: the advisor consistently applies defined rules, but it does not reproduce every judgment a human analyst might make.
How the BTCUSD Advisor Checks the Market
The advisor uses three timeframes, each with a different purpose.
| Timeframe | Role |
|---|---|
| H1 — one hour | Establish the broader directional bias |
| M15 — fifteen minutes | Confirm direction, measure volatility, and identify structural levels |
| M5 — five minutes | Look for a fresh entry-confirmation candle |
This separates the broader trend from the shorter-term entry decision.
1. H1 Trend Filter
The advisor uses the 20-period and 50-period exponential moving averages on closed H1 candles.
For a bearish bias, it requires conditions including:
- The 20 EMA below the 50 EMA
- The 20 EMA moving lower
- The last closed H1 candle below the 20 EMA
For a bullish bias, it looks for the opposite alignment.
These are trend filters, not predictions. Moving averages can lag, and markets can reverse even when their alignment appears clear.
2. M15 Confirmation and Volatility
The M15 timeframe adds a second directional check using its 20 EMA.
It also supplies a 14-period Average True Range, or ATR, which measures recent volatility.
ATR helps the advisor adjust:
- Level-zone tolerances
- Confirmation buffers
- Stop-loss padding
- Entry-drift limits
- Relative spread limits
This makes the rules more adaptable than using the same fixed price distance in every market condition.
3. M5 Entry Confirmation
The advisor waits for a newly closed M5 candle before evaluating an entry setup.
An incomplete candle cannot generate a new setup.
This is important because a candle can look like a strong rejection while it is forming, then close in a completely different shape.
Waiting for the close does not eliminate false signals, but it prevents the advisor from treating unfinished candle behavior as confirmed evidence.
Dynamic Support and Resistance
Support and resistance are recalculated from confirmed historical price pivots.
In simple terms:
- A confirmed swing low can provide a support reference.
- A confirmed swing high can provide a resistance reference.
The default M15 lookback is 64 bars, representing approximately 16 hours of M15 candles when the data is continuous.
The advisor also checks shorter-term M5 pivots when evaluating rejection setups and nearby obstacles.
Why Dynamic Levels Matter
Bitcoin can move quickly. A level that mattered earlier may become less relevant after a large breakout or a change in market structure.
Dynamic levels allow the advisor to respond to newer broker-feed data instead of continuing to display an outdated manual plan.
However, these levels are still algorithmic estimates. They are not a complete map of market liquidity, institutional positioning, or order-book activity.
The Two Main Setup Types
The advisor evaluates two main categories of setup.
Setup Type 1: Pivot Rejection
A pivot-rejection setup looks for price to interact with a previously confirmed level and then close away from it.
For a potential sell setup:
- The broader filters must support a bearish direction.
- Price must test a relevant resistance zone.
- A closed M5 candle must show the required bearish rejection.
- Spread, entry distance, stop distance, and reward-to-risk checks must pass.
For a potential buy setup, the logic is mirrored around support in a bullish market.
The advisor does not issue a setup simply because price touches a level.
Setup Type 2: Break and Retest
A break-and-retest setup begins with a confirmed M15 close beyond a relevant level.
For a bearish setup:
- An M15 candle closes below a pre-existing support reference.
- The advisor freezes that broken level.
- It waits for a later M5 retest.
- A closed M5 candle must reject the level under the programmed rules.
- The remaining filters must pass.
Freezing the level prevents the watched breakout reference from continually moving as new candles appear.
By default, a breakout watch can remain active for up to 90 minutes. It can end earlier if the direction changes or the level is invalidated.
Why the Advisor Often Says “WAIT”
A useful advisor should be able to reject trades—not just generate alerts.
The BTCUSD MT5 advisor displays WAIT when conditions do not justify a fresh setup.
Common reasons include:
- H1 and M15 filters disagree
- No qualifying M5 rejection has closed
- A breakout has occurred, but its retest has not
- The spread is too wide
- Broker quotes or candle history are stale
- The entry has moved too far from confirmation
- Nearby support or resistance leaves insufficient reward
- A manual event pause is active
- The configured Pakistan-time trading window is closed
- A position already exists on the same symbol
“WAIT” is not an instruction to close an existing trade. The tool does not manage positions or exits.
Entry, Stop-Loss, and Take-Profit References
When a setup passes the checks, the advisor creates a reference plan.
Entry Reference
The reference entry uses the current executable side of the quote:
- Ask for a potential buy
- Bid for a potential sell
This is more practical than treating a chart’s displayed price as the exact price at which both directions can be entered.
Your actual fill may still differ.
Stop-Loss Reference
The proposed stop is placed beyond the relevant rejection structure with additional padding.
For sell setups, the calculation also accounts for the spread because closing a short position uses the ask price.
The advisor rejects candidates with unsuitable stop distances under its configured rules.
Target Reference
The advisor projects a target from the risk distance, then checks whether nearby opposing levels limit the available space.
The default settings require a minimum reward-to-risk ratio of 2:1, with a projected target of 2.2:1 before any structural cap.
If no opposing pivot is found within the checked data, the target is explicitly identified as projected rather than confirmed support or resistance.
An Illustrative Reward-to-Risk Example
Consider a hypothetical sell setup:
| Item | Example price |
|---|---|
| Reference entry | $82,050 |
| Proposed stop | $82,300 |
| Proposed target | $81,500 |
The price-distance risk is $250, while the potential reward is $550.
That produces a reward-to-risk ratio of 2.2:1.
These are illustrative values, not a current trade recommendation. Account-currency profit or loss also depends on position size and the broker’s contract specifications. Commission and slippage are not modeled by the advisor.
Pakistan-Time Trade Alerts
The advisor displays timestamps in Pakistan Standard Time, UTC+5.
The panel can show:
- The current Pakistan time
- The time a setup was generated
- The setup’s review expiry
- The next scheduled M5 candle close
This makes the tool easier to use without repeatedly converting broker-server timestamps.
However, the advisor does not predict that a trade will occur at a fixed future time.
A displayed candle-close time means the next scheduled opportunity to check confirmation, not a guaranteed entry time.
Keep Your Computer Clock Correct
Live UTC calculations use MT5’s TimeGMT() function, which depends on the computer’s time configuration. Accurate clock and timezone settings are therefore important.
The advisor can estimate the broker’s UTC offset in live use. A manual offset setting is available if the conversion is incorrect.
For Strategy Tester use, a manual broker UTC offset is required because MT5 handles TimeGMT() differently during testing.
How to Install the BTCUSD Advisor in MT5
Step 1: Download the File
Download:
BTCUSD_PKT_Advisor.mq5
[Insert your download link here]
This is an MQL5 source file, not a standalone Windows executable.
Step 2: Open the MT5 Data Folder
In the desktop MT5 terminal, select:
File → Open Data Folder
Then open:
MQL5 → Experts
Copy the .mq5 file into that folder.
Step 3: Compile in MetaEditor
Press F4 to open MetaEditor.
Open the advisor file and press F7 to compile it.
Check the compiler output. Resolve any errors before proceeding; successful compilation alone does not validate the trading strategy.
Step 4: Attach It to BTCUSD
Return to MT5 and open:
Navigator → Expert Advisors
Refresh the list if necessary, then attach the advisor to your broker’s BTCUSD chart.
Symbol suffixes such as BTCUSDm are supported.
Step 5: Review Permissions and Inputs
The advisor does not need permission to modify Signals settings.
It also does not need order-placement permission because it contains no trade-execution functions.
Review the Inputs tab, then click OK.
Step 6: Wait for Fresh Confirmation
Keep MT5 open and connected.
The advisor first loads and synchronizes the required history, then waits for a new closed M5 candle. It deliberately avoids immediately replaying an old setup when attached.
Which Chart Timeframe Should You Use?
You can attach the advisor to an M1 chart or another displayed timeframe.
It reads H1, M15, and M5 internally, regardless of the visible chart timeframe.
Displaying M5 may make it easier to compare the panel with the confirmation candles, but it is not required.
Important Settings to Review
| Setting | Purpose |
|---|---|
AllowBuySetups | Enable or disable bullish setup checks |
AllowSellSetups | Enable or disable bearish setup checks |
MaxSpreadUSD | Absolute spread ceiling in quote-price dollars |
MaxSpreadATR | Spread ceiling relative to M15 volatility |
MinimumRewardRisk | Minimum acceptable reward-to-risk ratio |
ReviewWindowSeconds | How long a fresh setup prompt remains eligible |
RestrictPKTHours | Restrict setup checks to chosen Pakistan-time hours |
ManualPauseUntilPKT | Pause setup prompts until a specified PKT timestamp |
BrokerUTCOffsetMin | Override automatic broker-time conversion |
PushNotifications | Enable phone notifications after MT5 configuration |
Understanding the Spread Filters
Both spread limits apply.
For example, with the default relative limit of 20% and a hypothetical M15 ATR of $300, the relative spread ceiling is $60.
A $70 spread would fail that check even though it is below the default absolute ceiling of $80.
These settings are illustrative defaults, not optimized values for every broker.
Why Setup Alerts Expire
By default, a setup prompt expires after 60 seconds.
It can become invalid sooner if:
- The price moves beyond the entry-drift allowance
- The trend filter changes
- The stop or target reference is reached
- The live reward-to-risk ratio falls below the minimum
- A safety gate stops passing
An old popup or notification should never be treated as a fresh entry instruction. Check the current panel before acting.
Troubleshooting the Advisor
No Panel Appears
Allow a few seconds for history loading.
If nothing appears, inspect:
Toolbox → Experts
Messages there can help identify initialization, data, or configuration problems.
Only Compact Text Appears
The advisor uses a compact text display when the chart window is too small for its full panel.
Enlarge the chart or press Ctrl+T to hide the Toolbox and free up space.
It Keeps Showing “WAIT”
Read the displayed reason.
The absence of a setup is not automatically a fault. The rules may be rejecting current conditions.
Do not loosen filters simply to force more alerts.
Pakistan Time Looks Wrong
Check:
- Your computer clock
- Your operating-system timezone settings
- The broker-offset setting
- Whether you are running live or using Strategy Tester
Phone Notifications Do Not Arrive
Configure notifications in:
MT5 → Tools → Options → Notifications
Then enable the advisor’s PushNotifications input.
The desktop terminal must remain running and connected for the advisor to continue monitoring.
Testing Status and Limitations
The development checks included:
- 53 core-rule checks
- 20 timezone and broker-offset calculation checks
- A source check for prohibited order-placement, external-network, and DLL calls
These are engineering checks, not trading-performance results.
At the time this version was prepared, complete MetaEditor compilation, broker-feed behavior, notifications, and native MT5 runtime operation had not been verified in the development environment.
The strategy has also not been backtested.
It does not include:
- An automatic economic-news feed
- Order-book or liquidity analysis
- A machine-learning model
- Position sizing
- Automatic trade execution
- Trailing stops or exit management
- A verified win rate or profitability estimate
Frequently Asked Questions
Does this BTCUSD MT5 advisor place trades automatically?
No. It displays conditional setup prompts and proposed levels. You remain responsible for deciding whether to enter a trade.
Does it need TradingView login credentials?
No. It uses data from your already connected MT5 terminal.
Is it suitable for BTCUSDm?
The source supports BTCUSD-style symbols with broker suffixes, including BTCUSDm. You must still verify its behavior with your broker’s instrument.
Does it show alerts in Pakistan time?
Yes. The advisor formats its timestamps in PKT, UTC+5. Correct computer-clock and broker-offset settings are important.
Will it give a guaranteed accurate trade?
No. Meeting technical rules does not guarantee a successful outcome. The advisor has no verified accuracy percentage.
Can I use it on a live account?
It is read-only, but acting on its prompts can still expose you to financial risk. Compile, inspect, and demo-test it first; do not assume the default settings are suitable for live trading.
Will it continue working when MT5 is closed?
No. This version runs locally inside the desktop MT5 terminal, which must remain open and connected.
Final Thoughts
The BTCUSD PKT Advisor provides a structured way to monitor Bitcoin setups in MetaTrader 5.
It brings together dynamic levels, multi-timeframe checks, closed-candle confirmation, spread filters, reward-to-risk checks, and Pakistan-time alerts.
Its most useful output may sometimes be WAIT.
Use it as a decision-support tool—not a replacement for risk management, news awareness, or independent judgment. Verify the installation, test the rules on a demo account, and treat every setup as a possibility rather than a promise.