Algotrading bot

      1 Comment on Algotrading bot

This is algotrading bot for binary.com broker. It got some indicators in it, they got some logic for trade. Also you can add your own idicator to it and trade by it signals. Also bot got logic for take profit, stop lose and money manament.

First of all – read how to connect panel to binary com!

Review

This is how it looks like. Here you can choose indicator, to change it settings. You can chose one of strategies, and here youll see it logic. Then some button to “OFF” indicator or let it work in “TEAM” with others.

When you chose indicator, you can see it logic/ For now all indi logic you can find on this site below. Also there is 3 buttons – OFF, SELF,TEAM. This is settings for how will indicator work with other indicators. You can build your own logic and combine indicators as you want. Some of them can work like filter for others.

  • SELF – indicator will work alone and ignore other indi signals
  • OFF – indicator doesnt work
  • TEAM – signal will come only when all indicators will find the same signal the same direction.

Interface

Left number – you broker balance. On your first connection, bot will ask your balance from broker. So if you got right number – that means all is ok. Dont forget to make right settings for it to let it connect broker.

For now it got 5 standart indicators and each of them got 2-3 logics. First logic is good for self indicator trading, and 2nd one usefull, if you want to create team work strategy. Also you can add your own idicator and combine it with others, or just trade using only it signals.

StakeList

Button “T” will show you stake list. Here you can see last 10 trades by this bot.

Here you can see you stakes. It’s all simple, you’ll see maximum 10 stakes at the same time. When you open stakes list at bottom you will see also your profit value, number of pluses and minuses (stakes), winrate in persents and statistic for martingale and martingale – number of minuses/pluses in a row.

Settings

Next button “S” is for settings. Here you can set firs stake amount, expiration time and expiration type, and number of martin steps.

New version of panel got a lot more settings. First block – its about stake amount, time amount and time type.

Time type got this inputs – t,s,m,h,d. As you can understand it’s for ticks, seconds, minutes, hours and days.

Second block – settings for matrin/antimartin. Martin rate – its multiplier for next martin / antimartin step.
So martin – its number of martin steps. 1 – Martin off, >1 – number of martin steps, <-1 – number of antimartin steps.
For example, -4 means that bot will trade using 4 antimartin steps.
Then you got button to stop trade after last martin/antimartin step. For examaple if you trade 4 steps, after 4-nd lose bot will stop trade.
And last button – allow you to continue trading after lose (fo martin) or after win (for antimartin).

Next block is about take profit and stop lose. This is 2 levels of Profit, where bot will stop trading. 0 – does mean that bot will not check this settings.
If you print 30 to TProfit, that means that at 30 profit bot will stop trade. The same number of SLoss will mean that at -30 profit bot will stop. Stop level should be positive.
Then you got button to chose amount or percent. It means that stop lose and take profit will be set up as persent.
Next button made to turn on trail stop. More information about how it works you can find in other block on this page.

Next block got settings for invert. It allow you to invert signals and trade in opposite directions.

And last we got – empty field. Here you can print some name, it will be file name where bot will print some trade information.
To find this file you can press “Ctrl+Shift+D” in MT5 terminal, then do to “MQL5” and folder “Files”. Here will be you file.

Moneymanagement

This bot also got settings for moneymanagment. For now it got Martingale strategy, anti martingale strategy and fix stake.

On settings you can set martin number.

  • 1” – Means trade fix stake.
  • from “2” and more – Means trade with Martin of 2 or more stakes
  • from “-2” and less – Means trade with Antimartin of 2 or more stakes

MRate – allow you to set up multiplayer for next stakes of money management.

NOTE: If you want to turn on/ off martin / antimartin, and you trade fix stake before – you need to wait for closing all opened position, or restart expert, otherwise it can have logical mistake.
Also dont forget to check current stake value, after your changes.

ProfitLose

In new version of bot you got ability to use take profit and stop lose. Lets see how it works.

Take profit works the same for every settings of this param. The only different it got – amount or percent. That setting allow you to set up profit as percent of you start balance. Anyway it also some number of profit, reaching which bot will stop trading.

Stop lose is the same setting of profit, but for negative number, reaching which bot also will stop trading. It also can be set as amount or percent of start balance.
Lets talk about trailing stop, and how it works. Trailing stop will increase(means your balance, when bot stop trading) as increase your profit. If it set as amount it will be max difference between maximum profit and current one. If you profit grows – its ok, but if it downs for X amount, we will stop trading.

All settings of profit and lose connected with your profit, not balance. Thats because you balance can be changed some other way, not only bot trading. Dont forget it.

And the most interesting – trailing stop in percents… As we told befere, if stop lose set as percents – it will be also some amount, where bot stop trading. But main thing is – this percent is found from Maximum balance.
See some example, you have 100$ depo and 10% trailing stop lose. If you depo goes only down, stop lose will be 10$ and bot stops at 90$. But if you balance will grow up to 200$, stop lose will be recount as 10% from 200$ – and it will be 20$. So for new logic it will stop trade in 180$.


You should understand that trailing stop in percents will be recout depends on Max balance per trade.
Other logic is the same, we will se difference between maximum profit and current one, and if it more, than stop lose, bot will stop trading.

Strategies

#SMA1

Here Signals come when candle cross SMA. On screen you can see 3 signals one by one.

So all you need, to get signal, to have candle opening and closing from opposite sides of SMA. This is good setting for SELF trading.

#SMA2

Here signals come, if closing and opening of candle are on the same side of SMA.

This is a good settings for TEAM trade. This strategy can work like filter.

#SMA3

This is a new strategy for SMA. It finds signals when Candle touche SMA. Some examples on screen.

Can be good as flat strategy.

#RSI1

This strategy gives signals when RSI cross 20 or 80 levels. Level number can be set in input settings.

Signal comes when rsi comes into chosen levels. That means 0-20 and 100-80 levels. This settings is good for SELF trade.

#RSI2

This settings work when indicator above / below levels 20-80.

This settings can work good as TEAM trade, and also can work as SELF with Martingale.

#RSI3

This strategy gives signals when RSI cross 20 or 80 levels. Level number can be set in input settings.

Signal comes when rsi comes out of chosen levels. That means 20-80 level, instead of 1 strategy. This settings is good for SELF trade.

#MACD1

Next indicator – MACD. In this strategy signals come when MACD cross 0 level.

Settings good enough for SELF trade.

#MACD2

This logic gives signals when MACD above/ below 0 level.

This logic good for TEAM trade as filter.

#BLL1

This logic all about bollinger bands. First one gives signal when candle close above top line or below bottom line.

Works good for SELF trade.

#BLL2

Next logic works when candle close between top and bottom lines.

This can work good for TEAM trade as filter.

#2SMA1

This strategy gives signals when fast SMA cross slow SMA.

Dont forget, this strategy need long expiration time.

#2SMA2

This strategy gives signals when candle close below / above 2 SMA at the same time.

Work good as filter for other strategies.

#OUTER

In new version of panel you got ability to trade, using signals of outer indicator. It got the same SELF,TEAM,OFF settings and 2 input fields for UpSignal and DownSignal. Here you need to print name of graphical element, which will mean that bot need to open position.

How it works? All indicator have their special buffers for signals, and security politic of MT doesn’t allow my panel to see this buffers. And i decided to find not buffers, but find graphical element with special name, to open position. This element will be deleted and bot open new position.
So you can add some code lines to your indicator to make it draw some graphical elements, then print it names on bot, or use special tools for that.
I should Mention that bot finds signals every tick, instead if comon indicators in it, which finds signals every new candle. Dont forget it, if you need to combine it.
Of course empty names means that bot will not find something.

Inputs

Thats all for strategies. Now you can work. But first – see the input params for it.

First one – you broker id, wich allows bot to trade.
Second – site, to connect to broker.
Trade pair – you can chose one of list, or set “AUTO“.
Then account type.

Then we`ve got indicators settings. Now we got about 5 indicators and settings for them.

Thats all, dont forget to add site to MT5 settings, then bot can do trading.

1 thought on “Algotrading bot

Leave a Reply

Your email address will not be published.