Skip to content

EA Guide

Please refer to the updated EA Guide here:
https://docs.pineconnector.com/ea

 

This guide is to explain the different components of the PineConnector Expert Advisor.

pineconnector ea v2.080 metatrader tradingview bot fx


Parameter
Remarks
License ID
○ Your License ID is the long number string found in the intranet.

Parameter
Remarks
Target Type
○ Pips from current market price

○ Price indicated on your TradingView alerts message

○ Percentage from current market price
To have targets 1% from current market price, please use "sl=1" or "tp=1" 
Volume Type
Based on Dollar Amount
○ The amount that you will lose if your trade hits the specified SL
Example: 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.

Specified volume indicated on your TradingView alert message
○ Indicating "risk=1" will mean 1 volume/lot will be opened

Percentage of account balance (ensure SL is specified)
○ Position size will be computed automatically based on the SL specified
Pending Order Price
○ Pips from current market price

○ Price Specified from TradingView alert

○ Percentage from current market price
To have pending orders 1% from current market price, please use "price=1"
Account Filter Basis (Syntax)
Only execute signals your signals if they meet certain account requirements


Account Filter Options:
○ Account Balance
○ Account Equity
○ Margin Percentage
○ Free Margin


“Account Filter Basis” of “Account Balance” option chosen in your EA
○ Buy EURUSD signal will only process if your Account Balance has $500 or more
○ Buy EURUSD signal will not process if your Account is lower than $500


Sample Experts output when account filter requirement is met
Pyramiding
Off - Either 1 Buy OR 1 Sell
If you have either a buy or sell position open, all orders with the same symbol will not open

Off - Only 1 Buy AND 1 Sell
If a trade of the same symbol and direction is already opened, all incoming alerts will not be opened

On
No restrictions imposed to new trades.
All new alerts will be opened

On - If symbol and direction in profit 
Conditional restriction imposed to new trades
New market and pending orders will only be opened if profit from all positions with the same symbol and direction is positive


Pyramiding = Off - Either 1 Buy OR 1 Sell
Long EURUSD open Incoming long EURUSD will not open
Short EURUSD open Incoming short EURUSD will not open

Pyramiding = Off - Only 1 Buy AND 1 Sell
Long EURUSD open Incoming long EURUSD alert will not open
Only Long EURUSD open Incoming short EURUSD alert will open
Short EURUSD open Incoming short GPBUSD will open
normally since they are different symbols

If one of your Pending Orders gets filled, all other Pending Orders in the same direction and symbol will be cancelled
○ A buystop and a buylimit EURUSD pending orders in play. The buystop gets filled, the buylimit gets cancelled automatically.
    If you have an ongoing position, all pending orders in the same direction and with the same symbol will not be executed.
    ○ A buy EURUSD position is open. All buystop and buylimit orders received will not be executed. 

    Pyramiding = On
    EURUSD open Incoming EURUSD alert will be opened
    Only EURUSD short open Incoming GPBUSD short
    GBPUSD will open normally

    Pyramiding = On - If symbol and direction in profit
    EURUSD open Incoming EURUSD alert will be opened
    Sum of all long EURUSD floating profit is negative Incoming buy, buystop and
    buylimit EURUSDs will not be open




    ○ Sum of all long EURUSD floating profit is negative. Incoming long GBPUSD will open since symbol is different.
    ○ Sum of all long EURUSD floating profit is negative. Incoming short EURUSD will open since direction is different.
    Close on Reverse Signal
    On
    ○ Opening a trade with the same symbol in the opposite direction will close the first trade and then open the second order.
    ○ Only trades opened by the PineConnector EA will be closed.

    Off
    ○ Opening a trade with the same symbol in the opposite direction will NOT close the first trade.


    Close on Reverse = TRUE
    ○ Long EURUSD open. Incoming short EURUSD. Long EURUSD gets closed first. Short EURUSD opens.
    ○ Long EURUSD open. Incoming short GBPUSD. Long EURUSD untouched. Short GBPUSD opens.

        Close on Reverse = FALSE
        ○ Long EURUSD open. Incoming short EURUSD. Nothing happens to the long EURUSD. Short EURUSD opens.

            *If you are looking to close the Long EURUSD and not open another position, the appropriate command will be "closelong" or "closeshort".

            Shadow Targets
            (pip-based Target Type only)
            On
            ○ Shadow Targets will be used whereby SL and TP will be arbitrarily placed 100 pips further than intended SL and TP prices
            ○ Ensure that you have both SL and TP indicated at the point of entry – trade will close instantly without both targets

            Off
            ○ Shadow Targets will not be used


            shadow targets pineconnector


            pineconnector shadow targets
            Start & End Active Hour
            Basis: Broker time
            ○ Your local time may differ from the broker time
            ○ To check the broker time, you may refer to the broker time printed on your chart


            ○ From 00:00 to 24:00 - EA will always be active
            ○ From 08:00 to 12:00 - EA will only trigger entries from 8am to 12pm broker time
            ○ From 21:00 to 09:00 - EA will only trigger entries from 9pm to 9am (the next day), broker time


            pineconnector time filterpineconnector time filter
            Partial Close Percentage
            Close a percentage of your position instead by using the 2 new syntax commands, closelongpct and closeshortpct. The percentage closed will be based on your “Partial Close Percentage” option in your EA.


            Partial-Close Percentage Options:
            ○ 25% – closes in 4 equal parts
            ○ 34% – closes in 3 parts
            ○ 50% – closes in 2 equal parts


            ○ ID,closelongpct,EURUSD
            ○ ID,closeshortpct,EURUSD
            Maximum Open Positions
            ○ Define the maximum number of open positions
            ○ Use value "0" to not limit the open position count
            Maximum Open Positions Per Symbol
            ○ Define the maximum number of open positions in the symbol-level
            ○ Use value "0" to not limit the open position count

            Parameter
            Remarks
            Account TP Value
            (0 = disable)
            When account basis of Equity or Balance is equal or higher than the specified Account TP, your selected "Action" from the Action Option will trigger.


            - Account TP set at $10,000
            - Basis set as Account Equity
            - Action set as Notify and Halt EA
            - When your trading account's equity hits $10,000, a mobile notification will be sent and the PineConnector EA will be halted
            Account SL Value
            (0 = disable)
            Define the trigger value in terms of Balance or Equity (based on your "Safety Stop Basis" option) for the Safety Stop

            - Assume Safety Stop "50" set. When your account Balance or Equity hits or goes below $50, the basis will trigger. The action taken will be either of the 4 Basis indicated below

            Value used should be lower than the current Balance/Equity
            Basis
            ○ Account Balance

            ○ Account Equity
            Account equity is your Account Balance + Total Floating Profit from all open positions
            Action
            ○ Mobile Notification Only
            - Ensure that you have set up mobile notifications

            MT4 Mobile Notification Setup
            MT5 Mobile Notification Setup

            ○ Notify and Halt
            - All EA features, such as trailing stop-loss, will continue to be operational but will not accept new signals

            ○ Notify, and Close All Open Trades
            - You will be notified via mobile notification (if set up) and via a popup on your MetaTrader
            - All open positions (buy and sell) will be closed, and orders (buy limit, sell limit, buy stop and sell stop) will be cancelled

            ○ Notify, Close All Open Trades, and Halt EA
            - As per Notify and Halt, and
            - PineConnector EA will be halted – you may check the status on the attached chart
            - Label should read: "EA Status: EA HALTED"
            Reactivation of EA from Halt
            The EA can be enabled automatically from halt via either of the ways:

            ○ Reactivation: After Hitting Basis Value
            If the EA is halted, the EA can be enabled automatically if the Basis is equal or higher than the specified reactivation value.


            - Account SL set at $5,000
            - Reactivation value set at $5,500
            - Account Equity Basis, and Notify and Halt EA Action
            - Account Equity drops below $5,000 and EA will halt
            - When Account Equity eventually increases to $5,500, the EA will resume automatically where new signals will be processed

            Your reactivation value should be strictly higher than your Account SL.


            ○ Reactivation: After Every Bar
            The EA can also be reactivated automatically at the open of every bar on the timeframe you attach the EA on.


            - PineConnector EA attached on the D1 (daily) chart
            - At the open of the next daily bar, the EA will automatically set the EA status from halted to operational
            - Nothing will happen if the EA status is already operational

            Please note the following:

            (1) The Account TPSL action will only happen once per bar
            - If the EA is running on the D1 (daily) timeframe, the Account TPSL action will only occur once every day

            (2) The "firing status" of the Account TPSL can be found in printed on the chart (see screenshot below)


            (3) Hitting either Account TP or account SL will result in the Action triggering, and utilising the one TPSL action for the window

            (4) The creation of the new daily bar (and other timeframes) is dependent on your broker's time and settings, and not based on your local time

            (5) As for "Close All Open Trades", only positions and orders created by PineConnector EA and with the same Magic Number will be closed

            (6) Prior to running the feature on autopilot, we recommend that you test the Account TPSL capabilities on the M1 (1 minute) timeframe for better understanding

            Parameter
            Remarks
            EA and
            License Details
            ○ Display Full EA and License Details
            ○ Display only the License Expiry Date
            EA Magic Number
            ○ Default Magic Number of 76
            ○ Alternate Magic Number of 77
            ○ Alternate Magic Number of 78


            You may use different Magic Numbers to run different strategies on the same trading account. Please note that you will require multiple licenses to run, whereby you will have multiple License IDs as well.

            This means:
            ○ Strategy 1 -> runs on License ID 1 with magic number 76-> opens and closes based on alerts of strategy 1
            ○ Strategy 2 -> runs on License ID 2 with magic number 77-> opens and closes based on alerts of strategy 2

            For instance, on the same Trading Account. You would like to run a Moving Average Crossover Strategy on EURUSD 15 mins and 60 mins.
            The trade opens and closes will not be the same time despite being on the same symbol.

            You will be required to use the Magic Number feature to run both strategies concurrently on the same Trading Account.

            We recommend that you watch this video:
            Dual PineConnector EA setup and showcase
            Show Halt Button
            ○ On
            ○ Off
            Broker Set
            (MT5 EA only)
            ○ Broker Set A (Default)

            ○ Broker Set B (Unsupported Filling)

            For those who face the Error 4756 Unsupported Filling Mode for Brokers such as ICMarkets
            Compatible for clients who were using the "FM Mode" MT5 EAs