PortalBOT Wiki - Step by Step Setup
Please read carefully:
This software program or “bot” is a tool to assist traders to make it easier to run scripts from the TradingView platform to execute their own custom strategies on the BitMEX exchange. It is in no way a magic bullet or a means to “get rich quick”. It can be profitable if used with the correct strategy and timeframe which has been backtested properly and “tweaked” to excel in one of the most volatile markets there is, crypto currencies.
Use this wiki to setup your bot from start to finish. It will take roughly 30 minutes to complete. Take your time, pay attention, and double check your syntax for errors. If you encounter any problems during this time, please contact us through our Discord channel located at the bottom of this page, OR send us a ticket through the bot itself located on the HELP screen.
If you are going to use auto trader then please do not trade manually outside of the bot. In other words, use a different account to trade directly on the site. Otherwise, you will have discrepancies in the database.
Section 1 - Email Settings (Required)
Access Gmail Account Settings
- Note: Before we begin, I would like to recommend that you create a new Gmail account exclusively for the sake of security as well as simplicity.
- Once you have the new account created, please head over to the account security settings page on your Google account (Google account button (top right corner),security, less secure app access)
- Note: You cannot use any other email client at this time
Section 2 - Telegram Setup (optional)
Telegram setup is a little more involved so pay close attention to the steps as it can get a little confusing
Telegram is not essential to running the bot but it is very useful as it notifies you when you are in and out of trades
Telegram Setup Complete
Section 3 - API Setup (Required)
- Fortunately this step is pretty easy but in case you do not know how to do it I will cover it in this section
- Name – This is optional just as a label so you can tell it apart from others (ex. portalbot)
- CIDR – I would recommend you leave blank unless you have a static assigned IP address from your ISP
- Key Permissions -Make sure you choose “order”
- Keep the “withdraw” checkbox empty as it is
- Click “Create API Key” button
- Finally make sure you copy and paste the ID and secret to a “safe place” for the time being as we will be adding them to the bot straight away
- Finally again in the settings menu, select the exchange from the dropdown list
- Name your instance whatever you want (descriptive is wise)
- Now copy and paste your api key and secret into the text boxes
- Click the “+” sign
- Hit the save button
API Setup Complete
Section 4- AutoTrader (TradingView signals)
- If you are going to use Trading view signals you must first make sure the alerts are setup properly on the website itself
- We will be using the PortalBOT Pro script as an example here.
- Open the alerts section (I assume you know your way around the Trading View platform
- Lets go ahead and create an alert
- We start with the condition which tells the alert to act on this indicator or strategy when activated
- So in this case, its the script – I will choose the PortalBOT Pro script
- Below that are the actual conditions on the script
- For this particular script there are 4 conditions which we need to make alerts for
- The four conditions are as follows: Long Entry, Short Entry, Long Exit, and Short Exit.
- We are going to choose Long Entry to start
- Under options, we will choose “Once per bar close” – This tells the indicator to not repaint after the current candle is closed which in my case I have it set to the daily
- Under Expiration Time, we need to change the date as far as out it can go, which will noted by the white numbers not the greyed out ones
- Now for Alerts Actions we need to make sure that “Send Email” is checked – all the other selections are entirely optional depending on your tolerance for alerts 🙂
- And finally for the most important part: We will need to write a code in the message field for the bot to create the trades
- The code will be composed of 3 words
- The first is the name of the instance (which we covered in the past section which we named Demo) – so the first word has to be the instance name Demo <– case sensitive
- The second word is the trading pair – So if you are trading bitcoin on the BitMEX exchange its XBTUSD, and since I have an alert for the chart XBTUSD for BitMEX we will use that (if I were using TRXBTC on Binance I would be using TRXBTC as the pair name)<—Must be all caps
- Finally the last word in our message is BUY, SELL, or CLOSE (all caps)- since we are using a long entry as our condition we are going to use the word “BUY”
- So in total the message will read “Demo XBTUSD BUY“
- So in summary, this is how an alert to send to the bot is created. I could have easily created one for Short Entry, it would look like “Demo XBTUSD SELL” or another coin – lets say TRX for BitMEX. It would be “Demo TRXU19 SELL”
- Make sure you use the correct chart
- Note#1: Make sure you have at least a Pro Subscription with Tradingview to support your alerts. For my signal it takes 4 alerts to generate one signal, so make sure you plan accordingly
- Note#2: The BOT only allows for 3 trading pairs simultaneously on the BitMEX exchange since they have stringent rate limit policies for API.
AutoTrader Setup Complete
Section 5 -The Interface
- Active Trades: Shows you any open positions across all exchanges on the bot
- Total PnL: Shows your your profit or losses that you have earned while using the bot
- Bitcoin price brought to you by
- Total Market cap and Bitcoin dominance updated every 6 seconds per crytponator.io
- Fear and Greed index is straight from the api on their site which shows you in realtime market sentiment utilizing various factors like social media as well as technical factors
- Currently only one exchange is supported at this time: BitMEX.
- Binance and Deribit options will be coming towards the end of the year
- Instance PnL: Simply shows you profits from today, yesterday and current week based on the instance selected.
- Note: The instances button on the exchange will show you only the instances for that exchange in the below grid
- So what is an instance?
- An instance is a combination of the exchange and the trading pair that you intend to trade
- You named the instance when you setup the api
- You can have multiple instances (up to 3 for BitMEX)
- You add a instance by selecting any 3 headings called “BitMEX1 , BitMEX2, or BitMEX3 and choosing the pair you want in order to trade along with position size
- Note: The BOT will not trade if the position size =0, even if the tradingview portion has been entered in correctly because a position size of 0 means “null” in programming language and is ignored
- The instances are limited by the exchange rate limits on BitMEX.
- You will be able to trade more pairs simultaneously on Binance and Deribit as I have already checked into this
- So in the top left corner you have the current prices list which update every 6 secs from the exchange
- Clicking on them changes the chart
- But before that its good to login to the chart, especially if you are going to be using the AutoTrader
- Once thats completed, you can see the signals happen in real time
- Maximizing the screen is achieved by scrolling all the way to the right at the very top and selecting full screen mode
- One thing to note about Instance is you must select the instance you want to trade with using the dropdown then hit the save button <—Very Important
- We have added a handy BitMEX overload indicator which when activated will turn red. If you see it red, the best action to do depends on which way price is going. If price is against you it may be wise to close your position but I will leave that up for to decide.
- With the position size calculator – you can choose what percentage of your entire account you want to put on a single trade. Simply select the percentage or use custom to go higher (not recommended) then set your leverage on the right and your stop loss and then hit the calculate size button
- Hit “Execute/Save” button
- Note: There is a manual trade tab which allows you to make trades directly to the exchange without the use of a Tradingview script. Orders accepted are Market/Limit orders. Currently do not support trailing stops, or market buy stops or sell stops. (Planned for future release)
- The help menu is there for us folks
- If you ever run into any pop up errors, or something that just doesn’t seem right, export the log file and send it to us via the ticket request portal below
- That will aid us in understanding and determining the cause of the issue/error you are having
- We have also provided a link to our wiki page (here) as well as Discord channel
- Below that is your licensing info which you should reference when contacting us
- If you have any type of issue or concern please do not hesistate to reach out to us.
- Note: we are a team of three, so we will do our best to respond as soon as possible since we all live in different time zones