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

 
Pucter:

Is there any way to find out programmatically whether an object (trend, horizontal, custom average, etc.) is highlighted on the chart?

Thank you


No
 

With Open[] and Close[] you can get close and open prices for any bar back in the history, but for the current currency. How can I get Open and Close, of another currency, without opening its chart?

Mathemat See iOpen(), iClose().

 

I have run the Expert Advisors in the Strategy Tester a couple of times with optimisation ticked, but I haven't seen any tangible results. Please, advise, where can I read some tips on how to work with this optimization?

Roman. Search by searching through google: "How to correctly optimize an Expert Advisor site:mql4.com", also - How to correctly optimize an EA. There is an excellent collection of articles in the Tester section of the article library

I recommend a good book on this subject: "Development, Testing and Optimization of Trading Systems for the Stock Trader" by Ralph Vince - all in details, in clear and understandable (I should add a link to Pardo too).

 
granit77:

I have run my Expert Advisor in the Strategy Tester a couple of times with optimisation ticked, but I haven't seen any tangible results. Please, advise, where can I find more detailed information about optimization?

Roman. Search by searching through google: "How to correctly optimize an Expert Advisor site:mql4.com", also - How to correctly optimize an EA. There is an excellent collection of articles in the Tester section of the article library

I recommend a great book on this subject: Robert Pardo "Development, Testing and Optimization of Trading Systems for the Stock Trader" - all in details, in clear and understandable form.

Ralph Vince: The Mathematics of Capital Management.


Sorry, I confused Vince with Pardo - all literature (two books - in trailer) - I have no links... Also an informative interview on the subject with the winner of the 2008 EA championship.
 

How to determine the value of a point:

--------------------------------------------------------
drknn

The cost of a point. There is no such function in the language. We will have to write it ourselves.

All currency pairs can be roughly divided into three categories
- pairs with a direct quote (EURUSD, GBPUSD, all ***USD)
- reverse-quoted pairs (USDJPY, USDCHF, all USD***)
- cross rates (GBPCHF, EURJPY, i.e. all without USD in the pair).

For currency pairs with a direct quote, the pip value, expressed in USD, is calculated using the following formula
pip value = lot size * tick size
where
- lot size in B.C. (usually 100,000)
- tick step, for example for EURUSD it is 0.0001. For direct quoted currencies, the pip value is constant and does not depend on the current quote.
Example:
For EURUSD, the lot size is 100,000
tick is 0.0001
Pip = 100,000 * 0.0001 = $10.00
For currency pairs with a reverse quote:
Pip = lot size * tick step / quote
For currency pairs with a reverse quote, the pip value changes depending on the current quote.
Example.
For USDJPY, the lot size is 100000, the tick is 0.01. At 129.20
Pip = 100000 * 0.01 / 129.20 = $7.74
For cross rates:
Pips = lot size * tick * current quote of the base currency to the US dollar / current quote of the pair
Example for GBPCHF: at 2.3000 and 1.4550 base quote

100000 * 0.0001 * 1.4550 / 2.3000 = $6.33

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

And to clarify, if necessary, on the data from the branch: https://www.mql5.com/ru/forum/134864


 
It's time to write simple answers with examples on:
- how to program an EA to open a bar
- how to prevent reopening positions

There are a lot of repeated questions.
 
Here we go again with the same question. Who will answer for FAC?

smartemiy 26.09.2011 17:17

Guys !

how to limit the number of trades the EA can make at the same time ?

urgently!

Thank you !

if (OrdersTotal()>1 && OrdersTotal()<3) - ?
 
granit77:
Here we go again with this question. Who will answer for FAC ?


how to limit the number of trades the advisor can make at the same time?

The TOR is not clear here. What do you mean?

does it mean opening 5 orders at one signal ? or is it the existence of orders opened at different times, but not more than a certain amount?

The code example is suitable for the second position. it is in principle exhaustive within the terminal.

if (OrdersTotal()>1 && OrdersTotal()<3) - ?
 
sergeev:

The TOR is not clear here. what do you mean?

simultaneously - is it 5 orders opened at one signal ? or is it the existence of orders opened at different times, but not more than a certain amount.

the example code is suitable for the second position. it is in principle exhaustive within the terminal.


Usually get caught reopening a position on the same bar.
 

Start with either option. Otherwise there is nowhere to send the newcomer. Or rather, you have to send them to the wrong place :))

Reason: