Mt4 not enough money
Registering with a forex broker that offers a lower level is also a good option :-).
New forex bonuses
If (((accountinfointeger(ACCOUNT_MARGIN_SO_MODE) == ACCOUNT_STOPOUT_MODE_MONEY) && (accountinfodouble(ACCOUNT_FREEMARGIN) - symbolinfodouble(symbol(), SYMBOL_MARGIN_INITIAL) * lots * symbolinfodouble(symbol(), SYMBOL_MARGIN_LONG) > accountinfodouble(ACCOUNT_MARGIN_SO_SO))) || ((accountinfointeger(ACCOUNT_MARGIN_SO_MODE) == ACCOUNT_STOPOUT_MODE_PERCENT) && ((accountinfodouble(ACCOUNT_EQUITY)/(accountinfodouble(ACCOUNT_EQUITY) - (accountinfodouble(ACCOUNT_FREEMARGIN) - symbolinfodouble(symbol(), SYMBOL_MARGIN_INITIAL) * lots * symbolinfodouble(symbol(), SYMBOL_MARGIN_LONG))) * 100 > accountinfodouble(ACCOUNT_MARGIN_SO_SO))))
Forex blog
First-hand forex trading experience and information about foreign exchange market that will be useful to traders
Archives
Ordersend error 134 (no enough money)
Sometimes, especially during backtesting or in case of a badly designed expert advisor, the ordersend error 134 (or ERR_NOT_ENOUGH_MONEY) appears in the journal log of your metatrader platform. In MT5 this error is called TRADE_RETCODE_NO_MONEY and has a code 10019. The reason for this error is the same for both versions of the platform — lack of free margin to execute the ordersend function for the given position volume. The methods to solve this error are quite different (we won’t discuss the method, which is to deposit more funds to your trading account).
In metatrader 4, you have to code your EA to perform the following check before executing ordersend():
If (accountfreemargincheck(symbol(), direction, volume) > 0)
It will check how much free margin will be available after opening a position with the volume = volume in a given direction = direction. But comparing it with 0 isn’t a very good solution. One should pay attention to the broker’s level to consider the margin requirements:
If (((accountstopoutmode() == 1) && (accountfreemargincheck(symbol(), direction, volume) > accountstopoutlevel())) || ((accountstopoutmode() == 0) && ((accountequity() / (accountequity() - accountfreemargincheck(symbol(), direction, volume)) * 100) > accountstopoutlevel())))
This way we check the way your broker applies (absolute or relative level) and check if we’ll have enough margin after our next trade.
For metatrader 5 this condition would look like this (replace SYMBOL_MARGIN_LONG with SYMBOL_MARGIN_SHORT if you want to check margin before opening a short position):
If (((accountinfointeger(ACCOUNT_MARGIN_SO_MODE) == ACCOUNT_STOPOUT_MODE_MONEY) && (accountinfodouble(ACCOUNT_FREEMARGIN) - symbolinfodouble(symbol(), SYMBOL_MARGIN_INITIAL) * lots * symbolinfodouble(symbol(), SYMBOL_MARGIN_LONG) > accountinfodouble(ACCOUNT_MARGIN_SO_SO))) || ((accountinfointeger(ACCOUNT_MARGIN_SO_MODE) == ACCOUNT_STOPOUT_MODE_PERCENT) && ((accountinfodouble(ACCOUNT_EQUITY)/(accountinfodouble(ACCOUNT_EQUITY) - (accountinfodouble(ACCOUNT_FREEMARGIN) - symbolinfodouble(symbol(), SYMBOL_MARGIN_INITIAL) * lots * symbolinfodouble(symbol(), SYMBOL_MARGIN_LONG))) * 100 > accountinfodouble(ACCOUNT_MARGIN_SO_SO))))
It is quite complex compared to the MT4 version but it checks the same condition.
Registering with a forex broker that offers a lower level is also a good option :-).
Update 2016-11-01: thanks to alexander wait’s comment, I have corrected the formulas for account margin check.
If you have any thoughts, comments, or questions regarding metatrader ordersend error 134 or return code 10019 in MT5 and the ways to treat it, feel free to reply to this post using the form below.
Why does the "not enough money" message appear when I try to open a position?
"not enough money" means that there is not enough margin on your account to open a position of the desired volume.
What to do in this situation?
- Deposit funds to your account or transfer them from the other one to increase the amount of free margin.
- Reduce the volume of the position you want to open.
- Close other open positions on your account.
How to find out the amount of margin required for opening a position?
The easiest way to find out the amount of margin is to use trading calculator, which can be found on the corresponding page of our website.
Also, you can use the calculation formula:
Official sponsor of "starikovich-heskes" team at the dakar 2017
Experienced racers with more than 60,000 off road kilometers in europe, africa, and australia under their belt.
Official sponsor of muay thai fighter andrei kulebin
A many-time thai boxing world champion, an experienced trainer, and an honored master of sports.
- Home
- For clients
- Education
- FAQ
- Why does the "not enough money" message appear when I try to open a position?
Roboforex ltd is an international broker regulated by the IFSC, license no. 000138/107, reg. Number 128.572.
Risk warning: there is a high level of risk involved when trading leveraged products such as forex/cfds. 58.42% of retail investor accounts lose money when trading cfds with this provider. You should not risk more than you can afford to lose, it is possible that you may lose the entire amount of your account balance. You should not trade or invest unless you fully understand the true extent of your exposure to the risk of loss. When trading or investing, you must always take into consideration the level of your experience. Copy-trading services imply additional risks to your investment due to nature of such products. If the risks involved seem unclear to you, please apply to an outside specialist for an independent advice. Roboforex ltd does not target EU/EEA clients. We don't work on the territory of the USA, canada, japan, australia, bonaire, curaçao, east timor, liberia, saipan, russia, sint eustatius, tahiti, turkey, guinea-bissau, micronesia, northern mariana islands, svalbard and jan mayen, south sudan, and other restricted countries.
At roboforex, we understand that traders should focus all their efforts on trading and not worry about the appropriate level of safety of their capital. Therefore, the company took additional measures to ensure compliance with its obligations to the clients. We have implemented a civil liability insurance program for a limit of 5,000,000 EUR, which includes market-leading coverage against omissions, fraud, errors, negligence, and other risks that may lead to financial losses of clients.
© roboforex, 2009-2021.
All rights reserved.
Error 134 : not enough money
I'm new to metatrader so please excuse me to be such a noob.
I've been running a lot of backtests with different EA and even though I always have money in my balance, I keep getting the message error 134 : not enough money with all the EA. Some trades are made but not all the orders are lauched. Is this normal ?
This is weird because there are other people testing the same EA than me who don't get this error.
I have a metatrader demo account with $10,000 and 10:1 leverage.
I'm new to metatrader so please excuse me to be such a noob.
I've been running a lot of backtests with different EA and even though I always have money in my balance, I keep getting the message error 134 : not enough money with all the EA. Some trades are made but not all the orders are lauched. Is this normal ?
This is weird because there are other people testing the same EA than me who don't get this error.
I have a metatrader demo account with $10,000 and 10:1 leverage.
Simple math 10:1 leverage x $10,000 = $100,000. That is how much leveraged money you have available to 'use'. When you choose a number for "volume" when you set up a trade you will not be able to choose more than the number "1" because that "1" represents 1 (one) standard forex trading lot which is equal to $100,000. You would need to use no more than 10 x .1 size lots. I don't think you can "add" funds to a demo account nor change your leverage, (at least I can't find a way to do it) you can open another demo account and choose a larger amount to start with next time and/or up your leverage or, at your current acct size and leverage you can try trading .1 size lots - you should be able to have 10 trades worth .1 lot open simultaneously providing you don't exceed the margin. I hope this helps.
How to fix MT4 common error?
What is a common error in MT4?
Occasionally, errors in the MT4 platform may be noticed. One of the most frequent errors is off quotes MT4 error. Most often, we can see “common error” (error number 2) in the metatrader platform.
An MT4 common error in the lower-left corner of the metatrader platform is a signal error indicating that there is a connection problem (slow internet connection or no connection) between the metatrader platform and the server account.
How to fix MT4 common error on desktop and MT4 common error ios:
1) check the internet connection. There can be a problem with wi-fi or cable internet or some anti-virus software for some time. Any internet security programs block the internet connection of metatrader and the online server. “common error” and “off quotes” in MT4 are the most common errors.
2) enter the username, password, and IP server address when you log in to metatrader. If the internet connection is fine, then the problem is login parameters. If username and password are OK, very often, the problem is the server IP address.
Inter to pick “real 1” or “demo” server, you need to put full IP address (hotforex IP addresses example ).
See our youtube video about mt4 common error and our instructions:
How to login
Step 1: open your metatrader 4 terminal.
Step 2: click on the file at the top left corner of the platform.
Step 3: select login.
Step 4: enter your login details.
Step 5: enter the IP address (ask your broker for IP if you do not know) in the ‘server’ field.
Step 6: click login.
If you do not have an IP address, ask broker support to give you. Just ask them, for example: “what is IP for live 4 server? Then, they will help you.
This is something that we can often see when we have a problem logging in to the metatrader account.
Common error mt4 we can see on desktop computers and common error mt4 app problem on mobile phones. The solution is the same. The user needs to check the internet connection, username, password, or IP and then connect without error.
How to fix the MT4 common error message if login details and server IP are correct?
In the case log in details are correct common error can be fixed in this way:
- Close all charts in metatrader and close the platform.
- Restart the PC and then check do you have an excellent internet connection (for example, speed-test by ookla and check internet connection quality using packet loss test).
- Disable the antivirus program in a few minutes to check the metatrader platform, in case the antivirus blocks metatrader software.
- Run the metatrader platform and try to log in.
- If it doesn’t work again, try to create a new demo account and to log in. If you succeed, then the problem is the login parameter.
- Ask for help from your broker and ask again for server IP. Sometimes, different server IP will solve the problem.
Metatrader 4 not responding
except for “common problem,” there are a lot of MT4 errors.
Please see the list of the most common errors in the metatrader platform:
History base: not enough memory
I've imported three currency histories to MT4 that date from 2001.01.01 to present. Since then, my computer has slowed down and my demo account has been prone to problems the most recent of which being "history base not enough memory" messages. Is there a quick fix to this problem? For instance, since this all began with the importing of the three histories to MT4 and I really only need to test one history at a time, could either removing two of the histories from MT4 or deleting them from my computer aleviate these problems?
Thank you for your reply but so far I don't know what it means.
How are the bars to be limited in chart and history and what does it achieve?
And does your suggestion imply that removing two of the histories wouldn't be a solution?
Untrue, had this problem on my laptop with 2GB ram. Loaded EURUSD 1m data from 1.1.2001 and suddenly the whole thing went to shambles, response time in seconds, 50-60% cpu utilization, 50% being metatrader. Didn't know what was going on (I had no eas or indicators, only 1 chart with the chart data) until I set the bars in chart to something low and nice as I stated above. Bars in history is wrttien on disk and doesnt do anything here, but bars in chart does.
Computer turned to normal then. (was using core2 duo hp workstation with 2gb of ram on windows 7. I never had this problem on my desktop computer.
EDIT: umm i think you may have been answering a different question when you said that they don't have anything to do with ram problem (the one whether removing histories would improve the performace). To clarify that one, it would, but indirectly as your charts would not be filled with that much data. You can keep your histories and just set the bars in chart to a lower value.
Untrue, had this problem on my laptop with 2GB ram. Loaded EURUSD 1m data from 1.1.2001 and suddenly the whole thing went to shambles, response time in seconds, 50-60% cpu utilization, 50% being metatrader. Didn't know what was going on (I had no eas or indicators, only 1 chart with the chart data) until I set the bars in chart to something low and nice as I stated above. Bars in history is wrttien on disk and doesnt do anything here, but bars in chart does.
Computer turned to normal then. (was using core2 duo hp workstation with 2gb of ram on windows 7. I never had this problem on my desktop computer.
EDIT: umm i think you may have been answering a different question when you said that they don't have anything to do with ram problem (the one whether removing histories would improve the performace). To clarify that one, it would, but indirectly as your charts would not be filled with that much data. You can keep your histories and just set the bars in chart to a lower value.
Untrue, had this problem on my laptop with 2GB ram. Loaded EURUSD 1m data from 1.1.2001 and suddenly the whole thing went to shambles, response time in seconds, 50-60% cpu utilization, 50% being metatrader. Didn't know what was going on (I had no eas or indicators, only 1 chart with the chart data) until I set the bars in chart to something low and nice as I stated above. Bars in history is wrttien on disk and doesnt do anything here, but bars in chart does.
Computer turned to normal then. (was using core2 duo hp workstation with 2gb of ram on windows 7. I never had this problem on my desktop computer.
EDIT: umm i think you may have been answering a different question when you said that they don't have anything to do with ram problem (the one whether removing histories would improve the performace). To clarify that one, it would, but indirectly as your charts would not be filled with that much data. You can keep your histories and just set the bars in chart to a lower value.
How to optimise the MT4 platform
This article is intended to provide a brief guide on how to optimise the metatrader 4 (MT4) trading platform for optimal performance. It will cover how to handle the MT4 platform when it freezes, how to reduce max bars in a chart, how to optimise the RAM memory, how to edit profile settings, and it will also touch on custom indicators in MT4.
Metatrader 4 is a leading platform for trading forex, analysing different financial markets, and using expert advisors. Mobile trading, trading signals, and market integration are the vital parts of metatrader 4 that greatly enhance your forex trading experience.
The MT4 platform has been widely used by professional traders in order to navigate through the world of forex trading. But the journey can be a bit cumbersome, as your charts may eat up a lot of system memory and resources. You've probably noticed that your MT4 platform slows down occasionally, and experiences different problems such as:
- Lagging
- Freezes
- Slowdowns
- Chart lagging
- Slow execution of orders
Unfortunately, this list problems isn't limited to just these five, and you may experience additional problems such as updating problems, lagging indicators, and a complete system hang. So what do you do when the MT4 platform freezes? There aren't any secrets to making MT4 faster, but you can easily improve your MT4 performance by following these metatrader optimisation tips:
Source: metatrader 4 - the correlation matrix, the mini terminal, and other windows open simultaneously
Optimising MT4 performance
How to reduce max bars in a chart
- Open your metatrader 4 platform
- Click tools > options > charts and then find "max bars", located in the chart field
- Decrease this value by at least 50%
- If the performance still lags, keep decreasing the value until it becomes smooth
- Additionally, you can opt to decrease "max bars in history" too
Very often, step number 5 is not needed, as reducing "max bars in chart" alone should offer a dramatic performance increase. Steps 1–4 on the other hand, are extremely recommended, and should solve a lot of the performance related issues.
Source: metatrader 4 - reducing the maximum bars in MT4
Optimise the memory (RAM)
Generally speaking, active traders usually have more than one metatrader 4 terminal open during a trading session. This can be due to many different reasons, including the management of multiple accounts, demo trading, practising different trading strategies etc. The limiting factor to how many metatrader platforms you can run on a computer is based on the CPU speed and the memory available.
This can be an especially big problem when running metatrader on an older PC or mac. However, even new computers might experience the same problems with MT4 lagging, high memory usage, and annoying slowdowns. Below, you will find a list of simple changes you can apply to MT4 in order to reduce metatrader's memory leakage:
Source: metatrader 4 - optimising memory in MT4
- Try disabling features you do not use in the publisher, email and events tabs
- Disable 'news' in the server tab
- Press CTRL + M to market watch, then right-click and choose 'hide all', deleting all pairs that are not in use
- Close all the charts that you are not using (it will save your computer memory)
- If you are running any expert advisors, consider disabling any logging functions if they are not required
- Restart metatrader from time to time, to maintain low memory usage
Use profile settings
Profile settings allow you to control and group the number of charts and currency pairs that are open at one time. You can use these settings to save and load only those pre-selected currency pairs.
Let's look at an example:
Let's say that in the morning you only wish to see charts related to EUR, GBP, and USD, while in the evening or the night you prefer to only see AUD, NZD, and JPY-related crosses. Using profile settings, you can save a lot of time. First of all, you save a profile named "london" with charts such as EUR/USD, EUR/GBP, GBP/USD, and USDCHF. Then you can save a "tokyo" profile that would only bring up pairs such as USD/JPY, AUD/JPY, GBP/JPY, and NZD/USD.
Source: metatrader 4 - editing profile settings
Check out custom indicators
If your CPU is constantly overloaded and you notice that MT4 is not responding at all, the culprit may be one of the custom-made indicators. On the other hand, the default indicators that come with MT4 and the MT4 supreme edition plugin are optimised, and don't mess up with your computer memory footprint.
You need to check which custom indicator hangs your system and delete it. The problem is that many of the custom-coded indicators are badly coded and unoptimised. These indicators were developed by industry professionals, and though they offer more than 55 exclusive options, they don't burden the CPU power or the RAM. One note of warning: if you download indicators from other sources, please use custom indicators only from recognised and verified sources.
Pro tip: when you install a new indicator, you don't need to restart your platform in order for your custom indicator to show up in MT4. Just refresh the navigator panel, and your new indicator should appear after a couple of seconds.
Source: metatrader 4 - how to install a new indicator
Get educated on the MT4 platform
Any potential issues you may experience when using the MT4 platform are always resolved quickly, and MT4 has vastly improved since its initial introduction to the markets. Today it is considered the top platform for online trading—and rightly so. It is important to make sure that you have a good understanding of the MT4 platform before you start trading with it.
Therefore, making sure to educate yourself prior to using it is the best course of action. Admiral markets offers an extensive range of educational articles on trading that cover all sorts of topics, such as forex trading strategies, trading indicators, 'how to' guides, tutorials, and much more. If you would like to learn more about MT4, why not check out admiral markets' articles & tutorials section, and expand your trading knowledge before you trade with MT4! Alternatively, if you're ready to trade on the live markets, click the banner below to download metatrader 4 for FREE!
About admiral markets
admiral markets is a multi-award winning, globally regulated forex and CFD broker, offering trading on over 8,000 financial instruments via the world's most popular trading platforms: metatrader 4 and metatrader 5. Start trading today!
This material does not contain and should not be construed as containing investment advice, investment recommendations, an offer of or solicitation for any transactions in financial instruments. Please note that such trading analysis is not a reliable indicator for any current or future performance, as circumstances may change over time. Before making any investment decisions, you should seek advice from independent financial advisors to ensure you understand the risks.
Mt4 not enough money
Then x accountequity 100 accountstopoutlevel is incorrect. For your information xms stop out is 20 for all accounts types and the.
How much money can you make trading forex in 2019 daily
Moneybhai investor play stock markets with virtual money
Using mt4 for windows exness
Do not risk any money you cannot afford to lose.
You may have to register before you can post. In technical analysis, a candlestick pattern is a movement in prices shown graphically on a candlestick chart that some believe can predict a particular market movement. So obviously while ive allowed autotrading and allowing dll imports and the expert advisor is running with a smiley face but it does not give any alerts when. The recognition of the pattern is subjective and programs that are used for charting have to rely on predefined rules to match the pattern. There are 42 recognised patterns that can be split into simple and complex patterns.
Candlestick pattern reliability. If this is your first visit be sure to check out the faq by clicking the link above. Not all candlestick patterns work equally well. Their huge popularity has lowered reliability because they've been deconstructed by hedge funds and their algorithms. These well-funded players rely on lightning-speed execution to trade against retail investors and traditional fund managers who execute technical analysis strategies found in popular texts. In other words, hedge fund managers use software to trap participants looking for high-odds bullish or bearish outcomes. However, reliable patterns continue to appear, allowing for short- and long-term profit opportunities.
A mt4 not enough money trader on chart is a metatrader 4 plugin, and it comes as an expert advisor. You can attach it on up to 100 MT4 charts of any instrument or timeframe. Runtime errors codes of errors and warnings constants enumerations and structures mql4 reference. But with trader on chart, you can trade easily right from the MT4 chart. That's because trader on chart allows you to preset your trade details like lot size, stop loss, take profit, breakeven point, trailing stop, etc.
Mt4 not enough money. Enough money but the mt4 said not enough money. It is intended for educational purposes only and not as individual investment advice. If you see that there is not enough money to open a new position you can close some of your existing positions or deposit additional funds to your trading account.
That is your decision. It is a smart choice to have enough margins to support all your existing positions in any cases so you wont have to face stop outliquidation that could zero your account balance in a moment. Trading requires risking money in pursuit of future gain.
If you are getting the metatrader 4 error. So obviously my mt4 is not connected to my trading broker. This simply means not enough money.
No enough money. Please check from traders calculator to the amount of margin is required for a particular trading instrument and calculate the standard or hedged margin for all of your open positions. Following formula for mt4 is actually not quite right.
Let x accountfreemarginchecksymbol direction volume. First hand forex trading experience and information about foreign exchange market that will be useful to traders. The required margins margin levels and available margins for new positions are always visible in metatrader.
This document does not take into account your own individual financial and personal circumstances. To start viewing messages select the forum that you want to visit from the selection below. Ordersend error 134 it means you do not have enough money in your account to place an order with the given lot size.
Click the register link above to proceed. I take price data from a different broker and trade with a different broker.
Cryptocurrency trading bible four secrets of the bitmex
China cracking down on illegal underground forex trading in
Proven ways to fix expert advisor problems on metatrader 4
Why am I getting the error ‘not enough money’ when trying to open trades on my MT4 account?
If ‘not enough money’ massage pop up it means that there is not enough money to cover the margin requirement on the account, you will need to fund your account or close some/all open trades if any to free up margin.
To be able to open a position the free margin should be enough to cover the margin requirements, and the MT4 does not allow opening positions that would bring your margin level to 100% or less.
Please refer to the calculations below:
- Free margin = equity – held margin
- Margin requirement (FX) = (contract size * lots) /leverage * (conversion from base currency to USD)
- Margin requirement (CFD) = contract size * lots * price * margin percentage
* to find out the margin percentage for a symbol go to:
Market watch > symbol wanted > right click > symbol specification > margin percentage
Example 1: client’s free margin = $250 and wishes to open 1 lot EURUSD at 1.12320 and the account leverage is 500
- 1 lot EURUSD margin = (1 * 100,000) / 500 * 1.12320 ) =
200 EUR * 1.12320 (EURUSD conversion rate) = $224.64
The clients free margin ($250) > required margin ($224.64) which will allow the deal to be opened/placed
Example 2: client’s free margin = $12 and wishes to open 0.05 lots GBPUSD at 1.32030 while the account leverage is 500
- 5 lot GBPUSD margin = (0.05 * 100,000) / 500 * 1.32030 ) =
10 GBP * 1.32030 (GBPUSD conversion rate) = $13.20
The client’s free margin ($12) the client will receive “not enough money” error
Example 3: the client’s free margin = $1050 and wishes to open 10 lots us30roll at 27500, the margin percentage is 0.5%
- 10 lots us30roll margin = 1 * 10 * 27,500 *0.5% = $1,375.00
The client’s free margin ($1050) > required margin ($1,375.00 ) which will not allow the deal to be opened/placed and the client will receive “not enough money” error.
How to optimise the MT4 platform
This article is intended to provide a brief guide on how to optimise the metatrader 4 (MT4) trading platform for optimal performance. It will cover how to handle the MT4 platform when it freezes, how to reduce max bars in a chart, how to optimise the RAM memory, how to edit profile settings, and it will also touch on custom indicators in MT4.
Metatrader 4 is a leading platform for trading forex, analysing different financial markets, and using expert advisors. Mobile trading, trading signals, and market integration are the vital parts of metatrader 4 that greatly enhance your forex trading experience.
The MT4 platform has been widely used by professional traders in order to navigate through the world of forex trading. But the journey can be a bit cumbersome, as your charts may eat up a lot of system memory and resources. You've probably noticed that your MT4 platform slows down occasionally, and experiences different problems such as:
- Lagging
- Freezes
- Slowdowns
- Chart lagging
- Slow execution of orders
Unfortunately, this list problems isn't limited to just these five, and you may experience additional problems such as updating problems, lagging indicators, and a complete system hang. So what do you do when the MT4 platform freezes? There aren't any secrets to making MT4 faster, but you can easily improve your MT4 performance by following these metatrader optimisation tips:
Source: metatrader 4 - the correlation matrix, the mini terminal, and other windows open simultaneously
Optimising MT4 performance
How to reduce max bars in a chart
- Open your metatrader 4 platform
- Click tools > options > charts and then find "max bars", located in the chart field
- Decrease this value by at least 50%
- If the performance still lags, keep decreasing the value until it becomes smooth
- Additionally, you can opt to decrease "max bars in history" too
Very often, step number 5 is not needed, as reducing "max bars in chart" alone should offer a dramatic performance increase. Steps 1–4 on the other hand, are extremely recommended, and should solve a lot of the performance related issues.
Source: metatrader 4 - reducing the maximum bars in MT4
Optimise the memory (RAM)
Generally speaking, active traders usually have more than one metatrader 4 terminal open during a trading session. This can be due to many different reasons, including the management of multiple accounts, demo trading, practising different trading strategies etc. The limiting factor to how many metatrader platforms you can run on a computer is based on the CPU speed and the memory available.
This can be an especially big problem when running metatrader on an older PC or mac. However, even new computers might experience the same problems with MT4 lagging, high memory usage, and annoying slowdowns. Below, you will find a list of simple changes you can apply to MT4 in order to reduce metatrader's memory leakage:
Source: metatrader 4 - optimising memory in MT4
- Try disabling features you do not use in the publisher, email and events tabs
- Disable 'news' in the server tab
- Press CTRL + M to market watch, then right-click and choose 'hide all', deleting all pairs that are not in use
- Close all the charts that you are not using (it will save your computer memory)
- If you are running any expert advisors, consider disabling any logging functions if they are not required
- Restart metatrader from time to time, to maintain low memory usage
Use profile settings
Profile settings allow you to control and group the number of charts and currency pairs that are open at one time. You can use these settings to save and load only those pre-selected currency pairs.
Let's look at an example:
Let's say that in the morning you only wish to see charts related to EUR, GBP, and USD, while in the evening or the night you prefer to only see AUD, NZD, and JPY-related crosses. Using profile settings, you can save a lot of time. First of all, you save a profile named "london" with charts such as EUR/USD, EUR/GBP, GBP/USD, and USDCHF. Then you can save a "tokyo" profile that would only bring up pairs such as USD/JPY, AUD/JPY, GBP/JPY, and NZD/USD.
Source: metatrader 4 - editing profile settings
Check out custom indicators
If your CPU is constantly overloaded and you notice that MT4 is not responding at all, the culprit may be one of the custom-made indicators. On the other hand, the default indicators that come with MT4 and the MT4 supreme edition plugin are optimised, and don't mess up with your computer memory footprint.
You need to check which custom indicator hangs your system and delete it. The problem is that many of the custom-coded indicators are badly coded and unoptimised. These indicators were developed by industry professionals, and though they offer more than 55 exclusive options, they don't burden the CPU power or the RAM. One note of warning: if you download indicators from other sources, please use custom indicators only from recognised and verified sources.
Pro tip: when you install a new indicator, you don't need to restart your platform in order for your custom indicator to show up in MT4. Just refresh the navigator panel, and your new indicator should appear after a couple of seconds.
Source: metatrader 4 - how to install a new indicator
Get educated on the MT4 platform
Any potential issues you may experience when using the MT4 platform are always resolved quickly, and MT4 has vastly improved since its initial introduction to the markets. Today it is considered the top platform for online trading—and rightly so. It is important to make sure that you have a good understanding of the MT4 platform before you start trading with it.
Therefore, making sure to educate yourself prior to using it is the best course of action. Admiral markets offers an extensive range of educational articles on trading that cover all sorts of topics, such as forex trading strategies, trading indicators, 'how to' guides, tutorials, and much more. If you would like to learn more about MT4, why not check out admiral markets' articles & tutorials section, and expand your trading knowledge before you trade with MT4! Alternatively, if you're ready to trade on the live markets, click the banner below to download metatrader 4 for FREE!
About admiral markets
admiral markets is a multi-award winning, globally regulated forex and CFD broker, offering trading on over 8,000 financial instruments via the world's most popular trading platforms: metatrader 4 and metatrader 5. Start trading today!
This material does not contain and should not be construed as containing investment advice, investment recommendations, an offer of or solicitation for any transactions in financial instruments. Please note that such trading analysis is not a reliable indicator for any current or future performance, as circumstances may change over time. Before making any investment decisions, you should seek advice from independent financial advisors to ensure you understand the risks.
How to code an algorithmic trading strategy in 25 minutes
Algorithmic trading is a perfect skill to pick up if you are looking for a sustained source of income outside of your full-time job.
We are going to trade an amazon stock CFD using a trading algorithm.
The strategy is to buy the dip in prices, commonly known as “buy the f***ing dip” or “BTFD”. This means that we enter a long trade when amazon’s stocks fall in the short term.
Here are the steps for coding an algorithmic trading strategy:
- Choose product to trade.
- Choose and install software.
- Set up an account with a broker.
- Understand our strategy.
- Understand and setting up your MT4.
- Understand the parts of a MT4 trading algorithm.
- Code the rules for entering and exiting trades.
- Run a historical test with your algorithm.
- Run it live on fake money.
- Go make a cup of coffee and appreciate your work
[irp posts=”11995″ name=”6 technical skills in demand for future of business & finance”]
Choose product to trade.
We are trading the amazon stock CFD. CFD stands for contract for difference. It is a derivative that mimics the movements of actual stock. You can find more information here.
Choose and install software.
4 minutes (time elapsed: 4 minutes)
We will use thinkmarkets as our broker. Our software will be metatrader 4 (MT4).
MT4’s strength is that it is beginner friendly, which was why we chose it. However, the downside is that you can’t run heavy statistical analysis or complex machine learning
Open the installer and follow the instructions.
Set up an account with a broker.
2 minutes (time elapsed: 6 minutes)
After installation, your MT4 should launch automatically. If it doesn’t, go to the folder where it is installed and open it manually.
Set up an account with thinkmarkets via their website: set up demo account.
Input your personal details and check standard account.
Once you click start now, you will instantly be given your account login details.
Here are your login details, you should also receive them in your email.
Go to your MT4, under file, click ”login to trade account” and key in your account details.
Understand our strategy.
3 minutes (time elapsed: 9 minutes)
We want to buy when amazon dips. But in algorithmic trading, the word “dip” has to be quantified so that the computer understands it.
In our case, we shall enter the trade when the ask price of amazon is lower than its lowest price in the last 10 trading days.
Why 10? It is arbitrary. We usually run backtests and optimizations to determine this number. But for today, we will keep it simple and choose an arbitrary number.
On every trade, we will spend all the money in our account to buy the maximum number of shares possible. This is aggressive and I don’t recommend it for live trading, but since we are testing on fake money, let’s have some fun.
Only one trade will be held at the time.
We will close the trade when the price moves up by 30% (profitable exit) or moves down by 10% (loss-making exit). For instance, if we enter at $1600, we will close the trade at either $2080 or $1440.
Again, these are all arbitrary figures.
Understand and set up your MT4.
4 minutes (time elapsed: 13 minutes)
We won’t run through every part of MT4. You can learn the ins and outs of MT4 here in your free time.
We want to do 3 things for now:
- Increase your chart size
- Collect price data on amazon
- Download our robot template into your MT4
Increase your chart size.
The initial chart can hold 65000 data points. Let’s increase that.
Under tools/options, change the “max bars in history” and “max bars in chart” to 9999999999.
Initial settings your edit
After you are done, click ok. Open the options again. The max bars should show a different number.
Collect price data on amazon.
To do this, we need to open the amazon stock CFD chart and scroll back to the earlier time period. This will force MT4 to collect more past data.
Right-click anywhere on your market watch tab, click “show all” to show all the products you can trade.
Scroll down to find the amazon symbol. Right-click and click on “chart window” to open the chart.
Click on the D1 button. This will select the daily chart.
Each data point on the chart represents one day when the daily chart format is selected.
Uncheck “scroll the chart to the end on tick coming”. This will prevent the chart from auto-scrolling to the most current data.
In order to collect as much amazon price data as we can, click on your amazon chart and scroll back to earlier dates.
You can do this by scrolling with your mouse wheel. Alternatively, continuously click the home button on your keyboard (this is faster).
Keep scrolling until the chart stops moving. That is the limit.
Download our robot template into your MT4.
Our robot is called btfd_stockbot.
Download both the incomplete version and completed version here if you haven’t: download link.
The incomplete version has some blanks for you to fill for practice. The complete version is the full working algorithm.
Open your metaeditor by clicking the book symbol. The metaeditor is where you will code your algorithms.
In your metaeditor, the navigator should already be open. If it is not, open it here:
The navigator contains a list of MQL4 code in your computer that you can access.
Right-click on the “experts” folder and click “open folder”. Put both mq4 files that you downloaded into this folder.
Refresh the list and you will see them there.
Understand the parts of an MT4 trading algorithm.
6 minutes (time elapsed: 19 minutes)
The programming language you are going to code in is called MQL4. An MT4 trading algorithm is called an EA (short for expert advisor).
There isn’t time to go through and teach you every line of code in our algorithm.
However, we will cover to most basic parts. This will be just enough for you to modify the template.
Here is a crash course on how to read code:
- The computer reads and runs the code from top to bottom.
- All black words are variables. Think of variables as entities that store values (similar to algebra!)
- “+” stands for add, “-“ stands for subtract, “*” stands for multiply, “/” stands for divide.
- “>” stands for greater than, “ this earliest point is the earliest date you can set your start date as.
Click “start” when you are ready!
Okay, you’ve just done your first backtest of a trading algorithm! Congratulations!
Click on the report tab to see the performance.
We’ve made $40K in the last 7 years with a starting capital of $50K.
Well, that sucks considering if you had just bought and held amazon through it all, you would have made about $400K.
Just base on this backtest, I won’t say that algorithmic trading doesn’t work. Most algorithms are more complicated and intelligent than this.
However, this backtest does show that buying the dip aimlessly loses to holding. No surprise here, especially since the stock we’re trading is a rocket ship like amazon.
Run it live.
0.5 minutes (time elapsed: 24.5 minutes)
The previous step was a historical test. Now, we will run this live on today’s market using demo money.
Your demo account should have 100,000 USD of virtual money to play with. This is not real money so don’t worry about losing it.
You can open the terminal tab to check how much virtual money you have.
To run live strategies, click the “enable automated trading” button
Open amazon’s price chart.
Open your navigator in MT4 (not the metaeditor) if it isn’t already open.
When amazon’s price chart is open, right-click on your algorithm and click “attach to a chart”.
The moment you shut down your MT4, the algorithm will go offline. Thus, to run strategies 24/5, we set up our algorithms in the cloud.
If you want to remove the algorithm, right-click on the chart. Go to expert advisors/remove.
Note that this strategy is just for educational purposes and we don’t recommend you run this strategy live on real money.
Moreover, this algorithm is stripped down to its bare bones so that its code is easy to understand. It doesn’t contain any risk management or notification systems.
Go make a cup of coffee and appreciate your work
0.5 minutes (time elapsed: 25 minutes)
I hope you are feeling pretty good about yourself now.
Even if you do not plan to trade with algorithms, you can use them to test and improve your ideas. The trades can then be entered manually.
Hope you’ve enjoyed this guide!
Disclaimer: being successful at algorithmic trading (or manual trading) is tough. It is not a get-rich-quick method and requires hard work.
So, let's see, what we have: forex blog first-hand forex trading experience and information about foreign exchange market that will be useful to traders archives ordersend error 134 (no enough money) sometimes, at mt4 not enough money
Contents of the article
- New forex bonuses
- Forex blog
- Ordersend error 134 (no enough money)
- Why does the "not enough money" message appear...
- What to do in this situation?
- How to find out the amount of margin required for...
- Error 134 : not enough money
- How to fix MT4 common error?
- What is a common error in MT4?
- How to fix MT4 common error on desktop and MT4...
- History base: not enough memory
- How to optimise the MT4 platform
- Optimising MT4 performance
- Optimise the memory (RAM)
- Use profile settings
- Check out custom indicators
- Get educated on the MT4 platform
- Mt4 not enough money
- Why am I getting the error ‘not enough money’...
- How to optimise the MT4 platform
- Optimising MT4 performance
- Optimise the memory (RAM)
- Use profile settings
- Check out custom indicators
- Get educated on the MT4 platform
- How to code an algorithmic trading strategy in 25...
- Choose product to trade.
- Choose and install software.
- Set up an account with a broker.
- Understand our strategy.
- Understand and set up your MT4.
- Increase your chart size.
- Collect price data on amazon.
- Download our robot template into your MT4.
- Understand the parts of an MT4 trading algorithm.
- Run it live.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.