X AutoPost – Complete User Guide

7 April 2026, 12:11
Yuichi Maruyama
0
5

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.

  1. Go to X Developer Portal
  2. Log in with your X account
  3. Create a project / app
  4. Set permissions to Read and Write
  5. 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

  1. Open Google Apps Script
  2. Create a new project
  3. Download the GAS script from the link provided above
  4. Paste the script into the editor
  5. 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

  1. Click Deploy
  2. Select Web App
  3. Execute as: Me
  4. Access: Anyone(required)
  5. 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
  1. Place the file in Experts
  2. Restart MT4 (required) 
  3. Confirm it appears in Expert Advisors

8. MT4 WebRequest Settings

  1. Open MT4
  2. Tools → Options → Expert Advisors
  3. Enable WebRequest
  4. 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

  1. Open chart
  2. Attach EA
  3. 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