A sub-workshop to fill in the FAQ (frequently asked questions). Let's help comrades! - page 12

 
sergeev:

Yes. That's an important point. There are a lot of options.

can you make some recommendations?

I'm not much of a recommender... I'm the one who's always asking.
 

Well, here's an option:

Where should a beginner start?

MetaTrader (MT) byMetaQuotes Software Corp."is a free software for internet trading, technical analysis of financial markets, development and use of automated trading systems. There are currently two versions of MT: MetaTrader 4 and MetaTrader 5, which is an extension of version 4. Hereinafter we will consider version 4 of the program (MT4).


MT4 can be downloaded and installed for free from the websites of companies providing internet trading services and using this trading platform. You can download MT4 directly from the website of program's developer. As there are versions of MetaTrader for a number of mobile platforms, this version has a slightly reduced functionality compared to the PC version.


MT4 consists of three main modules:

  • Trading terminal. Main functions: executing trades, logging of trades and events, trading account management, etc.
  • Strategy Tester. Used for testing of trading strategies.
  • Metaeditor. Used for creation of technical analysis tools, data processing, and automated trading systems in MQL4.


The MQL4 language allows you to significantly extend the capabilities of MT4. MQL4 is easy enough to learn even for people without programming experience. There are a lot of materials to help beginners to learn the language, and there is the MT4/MQL4 .community technical support site, where you can find:

  • MQL4 Tutorial. This is the MQL4 programming tutorial recommended for those, who do not have any programming skills and wish to start learning MQL4 programming by themselves.
  • Articles. More than 200 articles about different aspects of MT4 usage, programming in MQL4 and simple trading. Articles are written by different authors, designed for different levels of reader training, and can be of interest to a wide audience. Those who are new to the language can first of all study the MQL4 for Dummies series:
    - Getting Start ed
    - Complex issues in simple terms
    - Technical indicators and built-in functions
    - Custom Indicators (Part 1 and Part 2)
  • Thecode base of programs in MQL4 contains more than 2700 ready-to-use programs(scripts, libraries, indicators and Expert Advisors). It can serve as a good example for people who already have programming skills.
  • MQL4 Reference. An indispensable assistant in writing any program in MQL4.
  • This is the review of basic technical analysis of financial markets, as well as the description of all built-in technical indicators.
  • Forum. The main element of online user support. Here you can find answers to any question regarding MT4, MQL4 language and many other useful information. For quick and convenient access to the information interesting you on the forum there is FAQ (structured collection of answers to the most frequently asked questions), also it is recommended to use the search in the forum and other sections of the site. In case you fail to find the answer you are interested in by registering on the website (please read forum rules carefully), you can always ask your own question. To get a quick and correct answer, choose the most appropriate forum thread, such as Newbie Questions, or create a new one. Try to describe your problem in as much detail as possible, providing pictures, terminal logs and program codes, if necessary.

If you do not want to learn MQL4, you can use the services of professional programmers (preliminary recommended to read the article "How to order the writing of the Expert Advisor and get the desired result" ). ).

 
ok. added.
 

-------------------------------------------------------------------------------------------------------------------------------------

Question: How do I describe an MA intersection ?

Answer(VladislavVG): One way is to estimate the change in the sign of the muwings difference. The subtlety is the necessity to exclude the case of touching the moving averages without their consequent crossover.

function:

double Check2MAsCrossingDirection(
                    string SYMBL, int TF, 
                    int maFastPeriod, int maSlowPeriod, 
                    int maFastMode=MODE_EMA, int maFast_PriceType = PRICE_CLOSE,
                    int maSlowMode=MODE_EMA, int maSlow_PriceType = PRICE_CLOSE,
                    int bn = 1,
                    double porogInPoints = 0.5)
{
double dMA[] = {0,0};
double minPorog = MathMax(0.5,porogInPoints)*Point;
    dMA[0] = iMA(SYMBL, TF, maFastPeriod, 0, maFastMode, maFast_PriceType, bn) - 
             iMA(SYMBL, TF, maSlowPeriod, 0, maSlowMode, maSlow_PriceType, bn);
    if( MathAbs(dMA[0])<minPorog )
        return(0);// 
int  k = bn+1;
int bginBarNumber = Bars - MathMax(maSlowPeriod,maFastPeriod)- 1;
    while(k<bginBarNumber)
    {
        dMA[1] = iMA(SYMBL, TF, maFastPeriod, 0, maFastMode, maFast_PriceType,  k) - 
                 iMA(SYMBL, TF, maSlowPeriod, 0, maSlowMode, maSlow_PriceType,  k);
        if(MathAbs(dMA[1])>=minPorog) break;
        k++;
    }
    if(dMA[0]*dMA[1]<0)
        return(dMA[0]);
    return(0);
}

returns:

"0" - if there is no change in the sign of the difference or the value of the difference on the bar being examined.

The sign of the return value indicates the direction, traditionally:

"+" - up, i.e. the fast mooving is above the slow mooving,

"-" - downwards, i.e. the fast mooving is under the slow one.

result :


-------------------------------------------------------------------------------------------------------------------------------------

The indicator is in the attachment.


SZZ amended the function: excluded array overruns and introduced a minimum threshold of 0.5 points for crossing.

Files:
 
Files:
mql4_9.zip  332 kb
 

how to use the script in MT4 ), but such questions also occur

ZS:

there are all sorts of questions in the search engine )

 

how to build an indicator using an indicator?

( using iCustom in Russian)

description of the standard scripts in MT4 (I've never used them, because I didn't know how they worked)

how to add a new indicator in MT4

 
How do I install an EA, indicator, script, library or template in MetaTrader 4?

(AM2) To properly install an EA you need to do the following

1. Go to the folder where MetaTrader4 terminal is located (normally MetaTrader4 is installed on your computer in C:\Program Files\ MetaTrader4)
2. Copy the Expert Advisor file (you need to have it in ex4 or mq4 format) to the MetaTrader4/experts folder.
3. Restart your MetaTrader4 trading platform (turn it off and then turn it on)


In the terminal window "Navigator" ==> "Expert Advisors" you will see advisor that you added to the trading terminal (if advisor colour is gray it means that it has closed code and has no source code for its upgrade)

Start the Expert Advisor:

4. Make sure that in the terminal settings advisor allowed to trade.

To do it in the trading terminal press "Tools" tab in upper left menu then "Options" then "Expert Advisors".
In this window put a tick (if there is no tick) opposite the point "Allow EAs to trade".
If your Expert Advisor, which you have installed in your terminal, uses DLL, then you need to put a tick in front of "Allow to import DLL". Files with DLL permission must be placed in MetaTrader4/experts/libraries folder

5. Activate the EA by dragging it with the mouse from the Navigator to the trading chart of the required currency pair.
An EA name and smiley face should appear on the top right hand corner of the chart. If the smiley face does not smile, it means that the button to launch the Advisor is not pressed.
Clicking on the button "Expert Advisors" in the top menu of the terminal will start the Expert Advisor, which can start trading immediately. The EA is deactivated when you press the "Expert Advisors" button again.

How to install indicator in MetaTrader 4 ?

1. Go to the folder where MetaTrader4 terminal is located
(Normally MetaTrader4 is installed on your computer in C:³ Files³)
2. Copy the indicator file (the indicator file must be either ex4 or mq4) to the folder MetaTrader4/experts/indicators.
3. Restart MetaTrader4 trading terminal (turn it off and then turn it on)
In the terminal in the "Navigator" ==> "Custom Indicators" window you will see the indicator you added to the trading terminal.
Start of the indicator:
4. Activate the indicator by dragging it with your mouse from the Navigator to the chart of the required currency pair.

How do I install a script in MetaTrader 4?

1. Go to the folder where MetaTrader r4 terminal is located
(Normally MetaTrader 4 is installed on your computer in C:\Program Files\ MetaTrader4)
2. Copy the script file (you need the script file as either ex4 or mq4) to the folder MetaTrader4/experts/scripts
3. Restart your MetaTrader4 trading platform (turn it off and then turn it on)
In the terminal window "Navigator" ==> "Scripts" you will see the script you added to the trading terminal.
Launch script:
4. Activate the script by dragging it with the mouse from the Navigator to the trading chart of the necessary pair.

How do I install and activate setup files (set files) for an EA in MetaTrader 4?

1. Go to the folder where your MetaTrader4 terminal is located
(Usually MetaTrader 4 is installed on your computer in C:\Program Files/ MetaTrader4)
2. Copy the settings file (you will need the settings file to be in set format) to the MetaTrader4/experts/presets folder
3. Restart your MetaTrader 4 terminal (turn it off and then turn it back on)
5. Right click in the chart window and then click "Expert Advisor" then "Properties". Or just press F7 button on the chart
6. In the new window on the tab "Input parameters" click on the "Load" button
7. Find the required settings file for your EA and click "Open".
8. The Expert Advisor settings are loaded.

How to install a template in MetaTrader 4?

1. Go to the folder where MetaTrader4 terminal is located
(Normally MetaTrader4 is installed on your computer in C:\Program Files/ MetaTrader4)
2. Copy the template file (you need the template file to be in tpl format) to the MetaTrader4/templates folder.
3. Restart your MetaTrader4 terminal (turn it off and then turn it back on).
4. After that you can install the required template, right click on the desired chart and select "Template" in the menu, then click on the required template, after that it will be installed on the trading chart.

How to install library files in MetaTrader 4?

1. Go to the folder, where MetaTrader4 terminal is located
(Usually MetaTrader4 is installed on your computer in C:\Program Files\ MetaTrader4).
2. Copy the library file (you need the dll file) to the MetaTrader4/experts/libraries folder
3. Restart your MetaTrader4 platform (turn it off and then turn it on).
4. The dll library is installed.
 
Schedule of Forex trading sessions


(AM2) Forex/Forex trading sessions are time periods when banks and trading venues of one or several countries situated in one geographical area trade actively in the currency market, thus determining price variations of world currencies, the difference of which may lead to profit. In between active trading sessions in Forex/Forex the volatility of the market is somewhat reduced.

In the forex/Forex market, there is no clear timetable for trading sessions. The currency market is available to traders around the world around the clock. How is that possible, and why are Forex/Forex trading sessions not strictly time-bound? There are many time zones across the globe, and when in one country the banks and traders are closing their trades, in another country at the other end of the globe at the same time the trading session is just beginning. That is the reason why any trader is able to work on the currency market 24 hours a day, 7 days a week. The only exceptions are weekends (Saturday, Sunday), as well as some public holidays (New Year's Day, Catholic Christmas, Easter). During Russian holidays the Forex/Forex market continues to operate.

Schedule of trading sessions Forex/Forex.

Time in the schedule of trading sessions is approximate, in different sources there may be a discrepancy of an hour and a half. Beside that it should be remembered that the time of Forex/Forex trading sessions is usually calculated by Greenwich Mean Time (GMT). The difference with Moscow time is 3 hours in winter and 4 hours in summer.

Trading sessionOpen time (Moscow)Closing time (Moscow)
Far Eastern/Asian
(Singapore, Tokyo, Hong Kong)
04.0012.00
Continental Europe
(Paris, Zurich)
9.0017.00
European
(London)
10.0018.00
American
(New York, Chicago)
16.0000.00
Pacific
(Wellington, Sydney)
00.009.00

It is worth noting that Central Russia is geographically very favourable for Forex trading. According to the schedule of trading sessions during the daylight hours a Russian trader can participate in the three most important Forex trading sessions: Asian, European and American.

Distinctions and features of Forex/Forex trading sessions.

Forex/Forex trading sessions differ from each other by the nature of market behavior and have their own characteristics. During different sessions, the behavior of a particular currency is usually different.

For example, during the Asian trading session yen and currency pairs with it (USD/JPY, EUR/JPY) are the most traded and most fluctuate in price. The movements of the Japanese currency could be quite significant because of the particular policy of the central bank of Japan that intervenes financially quite frequently. The Asian session is also known for one hour that is extremely active in market terms - 01 GMT, during which Japanese banks try to execute all transactions as the commercial exchange rates are fixed and the financial balance of currency institutions is determined.

EUR and GBP are actively traded during the European Trading Session. Most transactions involving GBP start at the opening of the London market, as the main volume of this currency is located there.

The American trading session is volatile, quite aggressive and unpredictable, especially during the hours when only American players remain in the market. The dollar may strengthen or weaken considerably, which will affect other currency pairs, bound to the dollar. Very important for the currency market US economic news is published at the joint of European and American sessions.

Of all the Forex/Forex trading sessions, perhaps the most suitable for a novice trader is the quieter European trading session.

 
How do I calculate pip value, margin and transaction result?


(AM2) Calculation formula to calculate the pip value of 1 (one) pip
Price of 1 pip = minimum price step * trading volume
If you apply this formula, remember that the pip value in the result of the calculation is always the quoted currency, i.e. the currency that is in the currency pair to the right.
Calculating the value of 1 pip in a trade of a whole contract (1 lot)
Consider that you opened a 1 lot position on EUR/USD
Current price EUR/USD = 1.3564
Standard contract size (1 lot) = 100,000 EUR
Action #1. Calculate minimum price step (1 pip)
1.3564 - 1.3563 = 0.0001
Action #2. Multiply the minimum step by the trade volume (lots/s)
0.0001 * 100,000 = 10 USD
Answer: The value of 1 pip is 10 USD
Calculating the value of 1 pip in fractional (lot) trading
Let's assume that you opened a position on the EUR/USD currency pair in the volume of 0.85 lots
Current EUR/USD exchange rate = 1.3564
Standard contract size (1 lot) = 100,000 EUR
Action #1. Calculate minimum price step
1.3564 - 1.3563 = 0.0001
Action #2. Calculate the contract which we are trading (0.85 lots) in money terms.
100 000 EUR = 1 lot
X EUR = 0.85 lot
100000 * 0.85 / 1 = 85000 EUR
85000 EUR = 0.85 lot
Action #3. Multiply the minimum step by the trading volume. Since in the EUR/USD currency pair, the quote currency is USD, then when multiplying the minimum price step by the trading volume we obtain the point value in dollars.
0.0001 * 85000 = 8.5 USD.
Answer: 1 pip when trading 0.85 lot is equal to 8.5 USD
Calculating the value of 1 pip and then converting it to another currency

Current exchange rate GBP/JPY = 151.17
Contract size = 100,000 GBP (GBP)
Action #1. Calculate minimum price step
151.17 - 151.16 = 0.01
Action #2. Multiply minimal price step by contract size
0.01*100,000 = 1,000 JPY (Yen)
The price of 1 pip will be equal to 1000 (JPY)
Action 3. To see the pip value in USD, we need to divide the value in yen by the current USD/JPY quote
Calculating the Margin
Margin (margin) is the amount required to open a leveraged trading position.
The word margin has the same meaning in exchange trading as the word collateral.
The formula for calculating margin (collateral)
Margin (Collateral) = Trade volume / Leverage
Calculation of margin on condition of trading the whole contract (1 lot)
You need to calculate the margin for trading with 1 lot for GBP/USD currency pair
Standard contract size (1 lot) = 100,000 GBP
Leverage = 1:100
Current GBP/USD quote = 1.6270
Calculate the margin using this formula
Margin (margin) = 100.000 GBP / 100 = 1000 GBP
To convert this figure (1000 GBP) into USD let's multiply it by the current rate of GBP/USD
1000 GBP * 1.6270 = 1627 USD
Calculating the margin for fractional lot trading
You need to calculate the margin, assuming that you trade 1.25 lots on GBP/USD currency pair
Standard contract size = 100.000 GBP
Current price GBP/USD = 1.6270
Assuming that you opened a 1.25 lot position, we need to calculate the margin.
Action #1. Calculate 1.25 lots in money terms
100.000 GBP = 1 lot
X GBP = 1.25 lot
100.000*1.25 / 1 = 125000 GBP
125.000 GBP = 1.25 lot
Action #2. Calculate the deposit according to the formula above:
Deposit = 125000 / 100 = 1250 GBP
To convert your deposit from GBP (pound sterling) for example into USD, multiply the GBP amount by the current GBP/USD rate.
1250 GBP * 1.6270 = 2033 USD
Calculation of financial result of the trade
For Buy position:

Financial result = (trading volume * closing price) - (trading volume * opening price)
For example, you performed a BUY trade (1 lot) on USD/CHF currency pair.
Standard contract (1 lot) = 100 000 USD
Current USD/CHF rate = 1.1395
Open price = 1.1345
Close price = 1.1395
Recalculate financial result according to the formula above
Fin. Result = (100.000 * 1.1395) - (100.000 * 1.1345) = 113950 - 113450 = 500 CHF
In order to convert this result (500 CHF) into US Dollars, we divide CHF 500 by the current USD/CHF exchange rate of 1.1395
500 / 1.1395 = 438 USD

There is a quicker and simpler way to calculate your financial results. If you frequently trade with certain financial instruments with your customary trading volume, you know the value of 1 pip. You need to multiply the number of points earned by the value of one point in order to calculate your financial result.
For a Sell position:
Financial result = (trading volume * opening price) - (trading volume * closing price)
For example, you made a Sell position with 1.5 lots on USD/JPY currency pair
Standard contract (1 lot) = 100.000 USD
Current USD/JPY Rate = 96.20
Open Price = 96.70
Close price = 96.20
Action #1. Let's represent 1.5 lots in terms of money.
100.000 USD = 1 lot
X USD = 1.5 lots
100 000 * 1.5 / 1 = 150 000 USD
150 000 = 1.5 lots
Action #2. Calculate the financial result according to the formula above
Fin. Result = (150.000 * 96.70) - (150.000 * 96.20) = 14505000 - 14430000 = 75000 JPY
To convert the result (75000 JPY) into US dollars divide 75000 JPY into the current USD/JPY rate of 96.20
75000 / 96.20 = 779 USD

Reason: