2️⃣How to use TradeSmart PREMIUM scripts with PineConnector?
PineConnector is our go-to tool when talking about automated Forex trading. Here, you will learn how you can Pineconnector with TradeSmart PREMIUM Strategies.
Last updated
PineConnector is our go-to tool when talking about automated Forex trading. Here, you will learn how you can Pineconnector with TradeSmart PREMIUM Strategies.
Last updated
If you have any issues during the process, you can always check out PineConnector's Errors and Solutions page.
Ensure that you are Using a Compatible Operating System.
PineConnector is compatible with the following Operating Systems:
MacOS
Windows 10 and 11
Windows Server 2016, 2019 and 2022
First, you need to register for PineConnector.
Once you are logged in click the "Members Portal" button in the top right corner.
Next, click the MT5 button, this downloads the PineconnectorEA file that you will have to use later in Step 6.
Also save your preassigned License ID, you will need this in Step 10.
If you do not have Metatrader5 installed, click the link here, and download the one fitting your operating system, or follow the instructions of your broker.
Once Metatrader5 is installed open it and click “File” → “Open Data Folder”.
In your Data Folder, click on “MQL5”.
In your MQL5 folder, click on “Experts”.
In your Experts folder, paste the PineConnector EA that you have downloaded in Step 4.
At the top of your MetaTrader 5, click “Tools” → “Options”.
Then click "Expert Advisor" and tick "Allow DLL Imports" and "OK".
At the top of your screen, ensure that “Algo Trading” is in green.
Open Navigator by pressing “Ctrl+N” → Right click on “Expert Advisors” → Click “Refresh”.
The chart symbol has to be the same as the one you use on Tradingview, otherwise the strategy won't work.
Right click on the PineConnector MT5 EA and click “Attach to Chart”.
Under the "Common" tab, tick “Allow Algo Trading”.
Under "Dependencies", tick “Allow DLL imports”.
Under "Inputs", add your Pineconnector License ID, which you saved Step 4, then click "OK".
Lots
Indicating "risk=1" will mean 1 volume/lot will be opened
Dollar Amount
The amount that you will lose if your trade hits the specified SL
If you have an EURUSD trade with 15 pip SL with $1000, risk=1 with this Volume Type will mean that hitting the SL you will lose $10
Percentage of Balance, Lots
Using “risk=1”,
0.1 lot will open on a $1000 account
1 lot will open on a $10,000 account
10 lots will open on a $100,000 account
sl= syntax is not required
Percentage of Balance, Margin
If you set "risk=1" on a $1000 account, it means that opening a position will increase the margin by 1% or $10
Percentage of Balance, Loss
Using “risk=1” on a $1000 account translates to you losing 1% or $10 if you were to hit SL
sl= syntax is required
Position size will be computed automatically based on the SL specified
If you did everything correctly, you should see the following screen with the “Successfully connected to PineConnector’s Server” text.
Next open up Tradingview in a new window and one of our PREMIUM scripts to the chart you would like to use.
Click the Strategy Settings and scroll down to the bottom, to the Automation part.
Tick the "Use Automation" box.
Here you can insert PineConnector's Syntax:
Components
License ID: unique identifier found in the Licensing Dashboard (from Step 4)
Commands: actions like “buy”, “sell”, etc. (no equal (=) sign)
Symbol: asset or instrument to be traded
Others: additional components with equal (=) sign such as “risk=”
For the exact syntax and rules check out PineConnector's Syntax Guides.
Structure
The syntax must follow this order: LicenseID, Command, Symbol, Others
Components must be separated by commas (,) with no spaces
Each alert can only have one License ID, Command, and Symbol.
Acceptable PineConnector Syntax
Unacceptable PineConnector Syntax
ENTER LONG ALERT: 111111111,buy,EURUSD,risk=1,comment="MyStrategy1"
ENTER SHORT ALERT: 111111111,sell,EURUSD,risk=1,comment="MyStrategy1"
EXIT LONG ALERT: 111111111,closelong,EURUSD,comment="MyStrategy1"
EXIT SHORT ALERT: 111111111,closeshort,EURUSD,comment="MyStrategy1"
In this case our License ID is "111111111".
If you want to enter long trade you should use "buy" command, in case of short you should use "sell" command.
To exit trades it is recommended to use "closelong" in case of long position and "closeshort" in case of short position, this will close all long and short positions.
Here I use the "EURUSD" Symbol as I will be using it's chart in Step 12.
In this example risk equals "1" this means that you will be trading 1 "piece" of the asset, here piece refers to to volume type you set in Step 10. This can be a percentage, dollar amount etc.
Comment is not required, although it is a very useful tool. This way, you can add a name to your strategy, which serves as a unique identifier. If you have two different strategies running, for example, on EURUSD, you should name them differently to avoid potential interference with alerts.
There are many other settings you can use to get the best results, for further instructions check out PineConnector's Syntax Guides.
Next in the top right corner click "Alerts" and then "Create Alert".
For Condition select the ATR GOD Strategy, you can add a name to the alert, and for the message set the following:
Next click "Notifications", tick "Webhook URL" and set the text to the following:
Then click "Create"
Congratulations! You now have a running script!