X AutoPost – Complete User Guide
This guide explains how to set up and use X AutoPost from start to finish.
Please read all steps carefully before use.
1. Overview
X AutoPost is an automation tool that posts your previous day’s trading results from MT4 to X (Twitter).
- Only trades closed on the previous day are included
- No post is generated on no-trade days
- The post shows the previous day’s result date
- Post text is automatically formatted
- Comments, emojis, and CTA can be randomized
2. Requirements
- MetaTrader 4
- X account
- X API access
- Google account
- Google Apps Script
All required files can be downloaded below.
Download Links:
GAS Script: Download GAS Script
Detailed Setup Manual: Download Manual
3. Important Notes Before Setup
This tool requires external setup.
If any of the following is missing, the system will NOT work:
- GAS is deployed
- X API is configured
- MT4 WebRequest is enabled
- Parameters are set correctly
4. X API Setup
This is the most common failure point.
- Go to X Developer Portal
- Log in with your X account
- Create a project / app
- Set permissions to Read and Write
- Generate:
- API Key
- API Secret
- Access Token
- Access Token Secret
Important:
- Regenerate tokens after permission changes
- X API requires credit (about $5 recommended)
- Without API access, this tool will NOT function
5. Google Apps Script Setup
- Open Google Apps Script
- Create a new project
- Download the GAS script from the link provided above
- Paste the script into the editor
- Save the project
Set Script Properties:
- WEBHOOK_TOKEN
- X_API_KEY
- X_API_SECRET
- X_ACCESS_TOKEN
- X_ACCESS_TOKEN_SECRET
All values must be correct. Any mismatch will cause failure.
6. Deploy GAS
- Click Deploy
- Select Web App
- Execute as: Me
- Access: Anyone(required)
- Deploy and copy the URL
Example:
hxxps://script.google.com/macros/s/XXXXXXXX/exec
If access is not set to "Anyone", the system will NOT work.
7. MT4 Installation
This is an EA (not an indicator).
- Correct folder: MQL4 → Experts
- Wrong folder: MQL4 → Indicators
- Place the file in Experts
- Restart MT4 (required)
- Confirm it appears in Expert Advisors
8. MT4 WebRequest Settings
- Open MT4
- Tools → Options → Expert Advisors
- Enable WebRequest
- Add:
https://script.google.com (required)
Copy and paste exactry as shown/
If this is not added, MT4 cannot send data and the system will NOT work.
9. Attach EA
- Open chart
- Attach EA
- Enable Auto Trading
10. Parameters
- InpGasUrl – GAS Webhook URL
- InpWebhookToken – Must match GAS
- InpProductName – Display name
- InpLinkUrl – CTA link
- InpDryRun – Test mode
- InpSendOnInit – Immediate execution
- InpMagicNumber – Trade filter
Important:
Token mismatch = system failure
11. Testing
Recommended:
- InpDryRun = true
- InpSendOnInit = true
Check:
- Connection
- Formatting
- Date
- Profit display
12. Live Operation
- InpDryRun = false
- InpSendOnInit = false
Posting frequency should be limited to once per day.
13. Post Logic
- Only previous day trades
- No trades = no post (this is normal behavior )
- Open trades ignored
14. Example Output
YYYY.MM.DD
X AutoPost
GOLD
+¥20,300 today
+¥45,462 total
Running 🚀
More ↓ (customizable)
hxxps://example.com
15. No Trade Behavior
No trades = No post (normal behavior)
16. Troubleshooting
- No post → No trades / wrong settings / dry_run enabled
- Invalid token → mismatch
- Unauthorized → API issue
- WebRequest error → URL not set
17. Usage Rules
- Use dry_run for testing
- Avoid repeated live testing
- Recommended: 1 post per day
18. Detailed Manual
For full details:
Download Full Manual
19. Disclaimer
This tool does not guarantee profit.
The developer is not responsible for any losses.
All usage is at your own risk.
External services such as X API and Google Apps Script may change without notice.
All usage is at your own risk.
20. Final Checklist
- X API ready
- GAS deployed
- WebRequest enabled
- Parameters correct


