expert advisor not working

Expert advisor not working and how to fix it

Expert advisor not working and how to fix it

Expert advisor not working? Now that can be pretty annoying. Don’t panic, we will give you a full tutorial of how to fix this issue. That is if the script has no errors. You will see that many issues with your expert advisor are easily fixed. Just follow the steps below.

Is your MT4 terminal connected?

Make sure that your trading terminal is connected to the internet. Check the icon in the bottom right corner of your platform and see if it changes (live connection) 

expert advisor not working

Is autotrading enabled?

To start your expert advisor in autotrading mode, enable this clicking the button in the main menu. It should turn green.

expert advisor not working

Did you enable "live trading allowed" in the EA's settings?

Is Live trading enabled? You can find this after you drag and drop the EA into the chart section and click the “Common” button in the top menu of that field. Or once your EA is already dragged and dropped, click the little smiley icon in the top right corner to check your settings.

expert advisor not working

 

 

Do your see the icon "smiling"?

In the top right corner the smiley icon should have a happy face. 

expert advisor not working

 

DNL settings

In your settings you can tick the box for “Allow DNL imports”.expert advisor not working

 

Expert advisor settings (inputs)

Many expert advisors come with numerous settings (set files) that can be adjusted. Make sure you check the setting for the spread and slippage and other imputs. For example if the max Spread is 2 pips, you will not see a trade in a GBPNZD pair since that spread is typically wider.

Check the Magic number

Pretty much all EA’s are coded with a so called “Magic number”. This number allows the EA to run on multiple charts (pairs) without getting confused. Usually this is a 5 digit random number which you can type in the EA settings. 

Check the Journal for error reports

In the bottom section of your trading terminal you will find the expert and journal tabs. Click on them to see if you see any errors. Your programmers might want these files to check.

expert advisor not working

Common error codes are:

Error code 130 (ERR_INVALID_STOPS): This indicates your StopLoss or TakeProfit value isn’t valid. Check them and make sure they are large enough.

Error code 131 (ERR_INVALID_TRADE_VOLUME): This means your Lot value isn’t valid.

Error code 133 (ERR_TRADE_DISABLED): Autotrading isn’t enabled in your MT4 platform.

You might want to contact your programmer in case you don’t know how to fix this. 

Expert advisor activation key

Many Expert Advisors come with an activation key. Make sure you entered the correct key. 

Currency pair extensions

For some reason most forex brokers use various extensions for showing all currency pairs. For example; EURUSD will look like EURUSD.c . This “.c” extension might confuse your EA. Its very simple for a programmer to fix this.  

Buy and Sell order at the same time

If this occurs your broker is probably located in the United States. Reason why this is a problem is because of regulations that forbid to go long and short at the same time. This is important to know before you want to trade with a grid trading robot using this method. 

Allow webrequest

Some EAs require to enable “allow webrequest” or “allow DLL imports” which you can find in the top menu under options >> expert advisors

expert advisor not working

Missing file message

If you purchase an EA on the internet, make sure to check if you downloaded the complete .ex file including library ordll files. Without these files your robot will not work. Another thing to check is to see if the file is located in the correct folder. For examle, an indicator should be stored in the indicator folder and not in the expert folder.  

Broker server issues

If your forex broker server is offline, contact your broker to ask them to have a look and reboot their server as soon as possible. If it happens often, you might want to switch broker.   

 

Remove the Expert Advisor and reinstall on your computer

If you checked all possible issues, try to remove your EA from the terminal. Right click on the little smily icon and follow the steps. 

expert advisor remove

Or watch this video

 

Still not fixed?

Contact your programmer and see if he can help you. Worst case scenario is that you bought a toxic file that will never work. So be careful where to buy an expert advisor online. If you see an interesting EA you can always contact us to have a look and see if it is not a scam robot.   

Test a strategy risk free!

Every week we start with new algorithmic trading strategies that you can copy in a demo account

Company
Legal
As seen in

   

  • +31614599248
  • Keizersgracht 241 Amsterdam The Netherlands

Risk Warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Between 74-89% of retail investor accounts lose money when trading CFDs. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

payment for order flow

Why payment for order flow should be banned

Why payment for order flow should be banned

Payment for order flow was not common knowledge for most stock traders. Until we saw the 2021 GME short squeeze. GME went from $5 to $400 in a matter of weeks. All of a sudden retail traders realized that their broker is not their friend. 80% of trading took place in Dark Pools where nobody has access to, other then banks and institutions. Thanks to the huge efforts of Reddit forum member and You tubers, PFOF is a toxic and the rumour is that it will be banned soon. 

What exactly is payment for order flow?

Payment for order flow is the compensation that brokerage firms receive by routing orders to different avenues for trade execution. The firm usually receives a small payment, which could be fractions of a penny per share, for directing orders to different market makers. This practice is much more prevalent in options trades since there are thousands of possible contracts in existence. PFOF has been in existence since at least the 1990s.

Many brokers chose the zero commission model where they offer trading “for free” in return for huge payments for sending their order flow to a market maker first. Robin Hood is a good example of a “zero commission” broker. 

What is a market maker?

Market makers are typically electronic trading firms. They buy and sell shares all day long, trying to profit from the bid-ask spreads. The market maker profits can execute trades from their own inventory or in the market. Offering quotes and bidding on both sides of the market helps to keep markets liquid.

Market makers that execute retail orders are also called wholesalers. The money that market makers collect from PFOF is usually fractions of a cent on each share, but these are reliable profits that can turn into hundreds of millions in revenue a year. In recent years, a number of firms have exited or sold their wholesaling businesses, leaving just a handful of electronic trading firms that handle PFOF.

In addition to profits from stock spreads, the orders from brokerage firms give market makers valuable market data on retail trading flows. They know exactly where a buy or sell range is by simply looking at all the limit orders.  When it comes to using institutional or retail investors, market makers also prefer trading with the latter because larger market players like hedge funds can trade many shares at once. This can cause big shifts in prices, hitting market makers with losses.

Market makers getting richer and richer

Equity and options trading has become increasingly complex with the rise of exchanges and electronic communication networks (ECNs) What is extra ironic is that payment for order flow is a practice pioneered by Bernard Madoff , the world’s most famous Ponzi scheme artist.

The Securities and Exchange Commission (SEC), currently led by Gary Gensler said, in a special study on PFOF published in December 2000, “Payment for order flow is a method of transferring some of the trading profits from market making to the brokers that route customer orders to specialists for execution.” How wrong could they be?

 

Given the complexity of executing orders on thousands of stocks that can be traded on multiple exchanges, the practice of being a market maker has grown over the last decades. Institutions are always looking for ways to trade risk free.

payment for order flow citadel1

Probably the most famous (notorious) Market maker must be Citadel. Hated by the so called “Ape army” who are led by guys like you and me, craving for deep intel and sharing this information via numerous platforms, such as Reddit, Twitter and Youtube. 

Greed blossoms everywhere and Bloomberg reports that Citadel Securities doubled revenues to a record $6.7bn last year, and made a record $4.1bn in earnings before interest, taxes, depreciation and amortization. 

How does payment for order flow work?

See the image below where it explains how payment for order flow works. As you can see, your order is NOT going to exchange before it hits the server of a market maker.

Typically these market makers use complex trading algorithms to manage the flow. How cute to know exactly what price you are willing to buy a stock where a trading algo tries to find the stock for a better price and fills you for you limit. A 100% risk free trade for a market maker. This is just one example of how this business model is so popular amongst the bankers and hedgies. 

Hopefully you will think again before trading with a broker that offers commission free trading. These brokers are NOT your friend. They just facilitate a very toxic way of making money at your expense. 

In the United States, accepting PFOF is only allowed if no other exchange is quoting a better price on the National Market System. The broker must disclose to the client that it accepts PFOF. Transactions must be executed at the best execution, which could mean the best price available or the speediest execution available.

How to prevent your orders from going to market makers first?

Actually this is rather simple.

First you can of course opt for a broker that does not support the so called PFOF model. Examples are Fidelity and Interactive Brokers. Although with interactive brokers you should disable the order routing. 

Another way to send your order directly to the exchange (Lit Exchange), many brokers offer you a feature to enable or  disable this. 

Conclusion

In the last decade many brokers to adopt the payment for order flow business structure. Due to low commissions its pretty much a no brainer. PFOF is now a major revenue source for brokers. 

For the retail investor, though, the problem with payment for order flow is that the brokerage might be routing orders to a particular market maker for their own benefit, and not in the investor’s best interest.

Investors who rarely trade or trade with very small quantities may not feel the effects of their broker ’s PFOF practices. But day traders and those who trade larger quantities should learn more about their broker’s order routing system to make sure that they’re not losing out on price improvement due to a broker prioritizing payment for order flow.

We hope the US will follow Canada and or the UK where PFOF is banned. Europe is already discussing a ban and it’s expected to be approved. Many brokers lost their focus on their mission, which is to always give the best price to their clients. 

Test a strategy risk free!

Every week we start with new algorithmic trading strategies that you can copy in a demo account

Company
Legal
As seen in

   

  • +31614599248
  • Keizersgracht 241 Amsterdam The Netherlands

Risk Warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Between 74-89% of retail investor accounts lose money when trading CFDs. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

bear market

How to trade a bear market

How to trade a bear market

A bear market is probably the greatest fear for stock traders. We all remember the images from investors or traders in 1973–1975, 2000–2002 and 2008 who just lost half of their money or worse. Although bear markets occur much less than bull markets it might be good idea to be prepared for the worst, since strong market corrections always happen when you least expect it.  

What is a bear market?

A bear market is when stock prices are declining and market sentiment is pessimistic. Generally, a bear market occurs when a broad market index falls by 20% or more over at least a two-month period.

Since 1930 there have been many market corrections but only eight bear markets. Historically, bear markets last shorter than bull markets as shown on the chart below.

bear market

〉〉 The average bull market period lasted 9.1 years with an average cumulative return of 476%.
〉〉 The average bear market period lasted 1.4 years with an average cumulative loss of -41%.

Many investors prefer to look at the S&P500 index as to warn them if markets are turning bearish.

 

What are the other types of downward markets?

There are four types of a downward market, and this is how they differ from a bear market.

Market pullbacks or retracements. This is a temporary reversal in the movement of share prices. A downtrend can be seen when a share price moves lower following a recent uptrend. A retracement doesn’t mean much since it happens all the time. It can be profit taking or covering a long or short position. There are technical indicators to determine whether it is a reversal or the start of something more.

Reversals. A reversal is a turnaround in the price movement of a share or other asset, when an uptrend becomes a downtrend. The period of decline is longer than a market pull back.

Market corrections. This is a 10% decline in the price of a share or index from a 52-week high. It is called a correction because it is sign that companies are currently overvalued, mostly due to speculation. A market correction is considered a good thing, since it releases market pressure and reduces the “hype”.

Recession. A recession is a complete economic decline that takes place over a six-month period or longer. During a recession stock prices will suffer too as businesses earnings are impacted.

 

How to spot if a market correction turns into a bear market?

Below some of the indicators that Bank of America uses to spot if the market trend turns bearish.

  1. Federal Reserve raising interest rates
  2. Tightening credit conditions
  3. Minimum returns in the last 12 months of a bull market have been 11%
  4. Minimum returns in the last 24 months of a bull market have been 30%
  5. Low quality stocks outperform high quality stocks (over six months)
  6. Momentum stocks outperforming (over six to 12 months)
  7. Growth stocks outperforming (over six to 12 months)
  8. 5% pullback in stocks over the last year
  9. Stocks with low price-to-earnings ratio underperform
  10. Conference Board’s consumer confidence level has not hit 100 within 24 months
  11. Conference Board’s percentage expecting stocks go higher
  12. Lack of reward for earnings beats
  13. Sell side indicator, a contrarian measure of sell side equity optimism
  14. Bank of America Fund Manger Survey shows high levels of cash
  15. Inverted yield curve
  16. Change in long-term growth expectations
 
I like to always keep a close eye on tightening credit conditions, which occurs when it becomes harder to borrow money from the bank. In times of uncertainty or an economic slowdown, banks will tighten their lending taps to hedge for risk. Each of the last three bear markets started when a positive percentage of banks tightened lending standards. A recent Fed survey showed banks expected credit standards to tighten this year.
 

What can I trade in declining markets?

Price declines are not the end of the world. Therefore it’s highly recommend to increase your knowledge about what asset classes to trade if markets turn bearish. Below a few of our picks:

Put options

A put option is an option contract that gives the buyer the right, but not the obligation, to sell the underlying security at a specified price (also known as strike price) before or at a predetermined expiration date. It is one of the two main types of options, the other type being a call option. Put options are traded on various underlying assets such as stocks, currencies, and commodities. They protect against the decline in the price of such assets below a specific price. Although it can be used to protect (hedge) your portfolio, options are considered to be a complex product. So make sure you understand how they work before start trading them. 

Buy ETF’s

An exchange-traded fund, or ETF, is a fund that can be traded on an exchange like a stock, meaning it can be bought and sold throughout the day. ETFs often have lower fees than other types of funds. Depending on the type, ETFs have varying levels of risk. Some ETF’s aim to gain value in declining markets. A few examples are 

ProShares UltraPro Short QQQ
ProShares UltraPro Short S&P500
ProShares UltraShort S&P500

Short index futures

Futures contracts, or futures, are legal agreements to either buy or sell a given security, commodity, index or asset at a specific time in the future, for a previously agreed-upon price. For investors, they offer access to commodities and other markets they might not be able to access otherwise.

Futures are a popular way to hedge bearish markets. By selling an S&P500 index future (ticker:ES) you will earn if the index declines. Downside of a future is that the contract sizes are rather large and you need to have a pretty large account in order to use this asset class for hedging. 

Algo trading

We wouldn’t be taken seriously if we would mention this interesting play during market declines. Reason be, robots trade long and short not to mention in very liquid asset classes. Although we mainly focus on forex robots, we also offer algorithmic strategies for other cfd’s, such as indices, stocks and commodities. Biggest advantage of using a trading bot is that it goes short without being affected by any kind of emotion. Since shorting is a complex game plan, you might as well give it a go with a trading bot. 

Find good stocks to buy

In a bear market, the stocks of both good and bad companies tend to go down. But bad stocks tend to stay down, while good stocks recover and get back on the growth track.

Conclusion

It’s hard to prevent your portfolio from being affected due to a market crash, correction or pull back. A bear market is a bit easier to detect, since many indicators as well as the media will start to send warning signals. Selling all your stocks is not a good idea,  since you will lose dividend payments and your money will be exposed to inflation. If we had to pick we would opt for any of the given options in this article whereas ETF’s are probably the lesser risky choice. As algorithmic trading crusaders we invite you to test one or strategies to see how they behave during any market condition.  

Test a strategy risk free!

Every week we start with new algorithmic trading strategies that you can copy in a demo account

Company
Legal
As seen in

   

  • +31614599248
  • Keizersgracht 241 Amsterdam The Netherlands

Risk Warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Between 74-89% of retail investor accounts lose money when trading CFDs. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

crypto trading bot

How to create a crypto trading bot

How to create a crypto trading bot

A Crypto trading bot is a hot item at this moment. Everybody is looking for this “Holy Grail” trading bot to gain wealth in a short period of time. Why are these trading bots so popular and how are they created? In this article we describe the steps that it takes to create a crypto trading bot. 

What exactly is a crypto trading bot

A crypto trading bot is automated software designed to monitor, analyze and execute trades across cryptocurrency exchanges using predetermined inputs.

Cryptocurrency trading bots often use artificial intelligence and machine learning to observe the market and automatically execute cryptocurrency trades in line with rule based algorithms.

Ideally, the bot generates a larger profit that is greater than if you would use a buy hold strategy. Since day trading any asset class is time consuming, people prefer to use bots to do their heavy lifting. It’s not all about huge profits, but more about good risk reward trade entries with proper risk management at mind. 

Advantages of using a crypto bot

Advantages

1. It trades 24 hours per day.

2. Is saves loads of time and agony. No more screen time all day.

3. It trades without emotions such as fear and greed.

4. Robots are easy to configure.

5. Robots can anyalise data or prices much faster than humans.

6. To trade with a crypt trading robot you don’t need any experience.

7. All trading is rule based sort of like a professional trading plan.

8. With a robot it is very easy to trade multiple crypto currencies simultaneously. 

Disadvantages

1. To trade a robot your trading terminal needs to be ON constantly. For this its recommended to you a Virtual Private Sever (VPS) which will cost around $10 monthly.

2. Robots do not have an eternal life span. Software is coded based on historical data. This means that if market conditions change so does the sript. Unfortunately if this happens you most likely will be too late.

3. A robot does not read the news. Therefore its always recommended to keep an eye on the market and not getting exposed in high volatile markets

4. In crypto it’s very hard to use economical indicators that might give you an edge whilst trading. For example; how does a FED rate hike influence the price. In Forex or Stocks it’s rather predictable, but not in Crypto. Thereofore we strongly recommend to either use a buy hold strategy or an intraday trading strategy. 

What steps to take

Although it sounds tempting to create a trading bot, make no mistake, since its definitely not an easy task. You need at least a good knowledge of trading and indicators in order to come up with a trading plan that can be profitable.

Therefore it’s recommended for newbies to not even think about this route and opt for an existing trading bot. There are many out there you can test to see if you like the concept of automated trading.

Create a trading idea/plan where you write down all trading rules.

Pick you programming language such as Pearl, C , Python or Javascript. 

Select your preferred crypto platform where you wish to run your trading bot. For example bybit.com 

Collect the API from your selected platform. For examply: Bybit API

Code your trading script ( you can use a professional programmer for this).

Debug your strategy. This part is most likely the most important part. Many trading bots are buggy and therefore you need to be absolutely sure your bot is bug free. Best to first back test it and then run the trading bot in a paper account. If this all works according to your preset rules, you are good to go and try it in a real account. 

crypto trading bot

What is an API

API stands for Application Programming Interface. Generally, a trading API is an interface that allows two unrelated systems to interact with each other, to allow a third party API platform to connect with Bybit’s to execute trading orders. 

On the other hand, the importance of having API documentation specifies the way that each of the two systems interacts with the API itself, to function. 

Understanding and using a trading API can allow traders to execute trades on their behalf, at the pre-set price and conditions. On Bybit, our API enables users to interact with our exchange programmatically, allowing you to check onto market data, process automated trading orders, manage accounts, and more. 

Conclusion

Do robots work? Absolutely! But, one needs to understand that Holy Grails only do not exist in trading. Creating your own piece of trading software is definitely a good idea, however the learning curve is steep. We like crypto bots a lot, but as experienced traders we dislike the lack of economical indicators. For that reason we like to trade with a crypto futures robot, that has more pivot points for entries. For example, these futers are traded on one exchange and that makes it all a lot easier. 

Best to simply test a crypto trading bot first. There are numerous bots available in a demo environment to trade and this is the safest way of finding out if robot trading is for you. 

Test a strategy risk free!

Every week we start with new algorithmic trading strategies that you can copy in a demo account

Company
Legal
As seen in

   

  • +31614599248
  • Keizersgracht 241 Amsterdam The Netherlands

Risk Warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Between 74-89% of retail investor accounts lose money when trading CFDs. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.