[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 328

 

Please advise.

I've read somewhere that there are some restrictions in MQL on the number of simultaneously loaded: arrays, mdicators, etc.

I don't know anything besides "no more than 8 ind. buffers", and also a restriction on max. and min. numbers. I'm having second thoughts.

 

Good afternoon, friends.


Apologies for the duplication of posts, it's just that the question is conceptual, in many ways defining for me at the moment...


_________________________________________________________________________________________________________________________

I would like to consult with you on such a question...


At present book market is saturated with materials about Forex, but the quality of these materials is often poor...

Nevertheless, there are plenty of books on theanalysis.


I would like to ask experienced traders, what books on the DESIGN OF TRADING STRATEGIES they have used, where they got material for the initial acquaintance.

Of course, these strategies are often worked out, market situations have changed, etc.


But I would like to study the issue of strategy writing in a comprehensive, systematic way.


What materials on strategies would you recommend?

What to read, watch and try?

_________________________________________________________________________________________________________________________

Thank you very much in advance.
 

Guys, maybe you've seen a ready-made solution...


The task is to calculate the lot size for N% trade size, taking into account the stop loss. I.e. for example 1% risk, 200 pips stoploss. The lot size should be such, that if the stop loss occurs, the deposit will lose 1%.


Thanks :)

 
ph3onix писал(а) >>

Guys, maybe someone has already found a ready solution...

The task is to calculate the lot size for N% trade size, taking into account the stop loss. I.e. for example 1% risk, 200 points stoploss. The lot size should be such, that if the stop loss occurs, the deposit will lose 1%.

Thank you :)

Well, somewhere like this:

For major majors, like EURUSD:

double lot=AccountEquity()* double Risk/(MarketInfo(Symbol(),MODE_LOTSIZE)*Point*int StopLoss);

for inverted ones, like USDJPY:

double lot=AccountEquity()* double Risk/(MarketInfo(Symbol(),MODE_LOTSIZE)*Point*int StopLoss*Bid);

But in the second case calculation is approximate, since the ratio is changing all the time.

It is difficult to calculate for crosses as it is impossible to say what Ratio will be at closing the order.

 
Roger >> :

Well, somewhere like this:

For major majors, like EURUSD:

double lot=AccountEquity()* double Risk/(MarketInfo(Symbol(),MODE_LOTSIZE)*Point*int StopLoss);

for inverted ones, like USDJPY:

double lot=AccountEquity()* double Risk/(MarketInfo(Symbol(),MODE_LOTSIZE)*Point*int StopLoss*Bid);

But in the second case calculation is approximate, since the ratio is changing all the time.

It is difficult to calculate for crosses as it is impossible to say what the price will be when the order is closed.

Thank you very much. Can MarketInfo be replaced with anything else? Either manual input or MarketInfo? Or maybe there are other options?


Crosses, I take it, are a real pain in the ass?

 
Hello! Please help me fix the Zone indicator (in the archive). I want it to color bars according to custom indicators Awesome and Accelerator. If Awesome and Accelerator have increased compared to their previous values, it is coloured in green, if both have decreased, it is coloured in red, otherwise it is coloured in grey. I am confused by indicators values themselves that are referenced from iCustom (Awesome and Accelerator). Thanks in advance.
Files:
indicators.rar  10 kb
 
ph3onix писал(а) >>

Thank you very much, can't MarketInfo be replaced by anything else? Either manual input or marketinfo? Or are there any other options?

I take it there's a problem with the crosses?

Well, most often it's 100000, but in some brokerage companies it may be different.

 
Roger >> :

Well, most of the time it is 100,000, but some DCs may differ.

Please, advise me what to do with crosses? I understand the calculation error, but isn't it possible to calculate the loss on the cross exactly?

 
The problem here is that you don't know the rate at the time of closing the order. Suppose you have AUDCAD and all settlements are in dollars. When you buy a lot, it may fall against the Canadian, but the dollar may also fall against the Canadian, and when you close the stop in 100 points, you may even make some profit in American dollars in the end, if the dollar has fallen more against the Canadian. That is, when opening a cross lot, you should still watch the ratio of the cross's base currency to the dollar.
 
Roger >> :
The problem here is that you don't know the rate at the time of closing the order. Suppose you have AUDCAD and all settlements are in dollars. You buy a lot, it goes down against the Canadian, but the dollar may also go down against the Canadian, and when you close the stop in 100 points, you may even make some profit in American dollars in the end, if the dollar goes down more against the Canadian. In other words, when you open a lot for a cross, you should still watch the ratio of the cross's base currency to the dollar.

And how do you know which currency is the base currency for the cross?

Reason: