[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 140

 
ikatsko:

Probably not determined by lot size after all IMHO. What is the mathematical relationship between these parameters?


MARGIN_REQUIRED = LOT_SIZE*K/LEVERAGE,

where K is the current price of the instrument's base currency against the deposit currency, i.e. if the instrument is EURUSD and the account is in roubles, then K is EURRUR

 
alsu:
1) leverage 2) current price 3) lot size

Thanks to your hint, I think I've found the answer:

MODE_MARGINREQUIRED = 1 lot size / leverage * current price

Example:

MODE_MARGINREQUIRED = 100000 / 500 * 1.2615 = 252.3

Cheers! And thanks!

 
Does anyone know what can be done in this situation? https://www.mql5.com/ru/forum/107476/page105
 
prescribe stoploss immediately, if the price reaches the trawl - remove stoploss
 

How to set CC.mq4 indicator parameters correctly ( https://www.mql5.com/ru/articles/1464 ) in iCustom?

There are too many parameters.

I did as shown below, but I have some doubts.

 double CCusd = iCustom(NULL,60,"CC",3,6,3,5,1,24,8,0,1);
 double CCeur = iCustom(NULL,60,"CC",3,6,3,5,1,24,8,1,1);

	          
 
Guys help plz.... I know it's easy to implement an EA when you know what to do and how to do it....

The essence of the EA is as follows: We use only the RSI indicator, or rather two RSI indicators with different periods (for example 14 and 17)! Well, here are the actual trading conditions:

Buy entry: When two indicators RSI with periods of 14 and 17 cross simultaneously and close above 30 level from the bottom up....

Enter to sell: When two RSI indicators with periods of 14 and 17 cross simultaneously and close below 70 from above downwards....

now for the stops and profits: stop loss 50 pips from the opening and profit 40....


Help YOU PEOPLE!!! I will personally test and fit each pair later.... the results will be posted here....
 
Sergey_Rogozin:

How to set CC.mq4 indicator parameters correctly ( https://www.mql5.com/ru/articles/1464 ) in iCustom?

There are too many parameters.

I did it as shown below, but I have some doubts.

double CCusd = iCustom(NULL,60,"CC",0,1);
double CCeur = iCustom(NULL,60,"CC",1,1);
Only the external ones are prescribed
 
Vovo4ka:
Guys help plz.... I know it's easy to implement an EA when you know what to do and how to do it....

The essence of the EA is as follows: We use only the RSI indicator, or rather two RSI indicators with different periods (for example 14 and 17)! Here are the actual trading conditions:

Entry to buy: When two indicators RSI with periods of 14 and 17 cross and close above 30 upwards simultaneously....

Enter to sell: When two RSI indicators with periods of 14 and 17 cross simultaneously and close below 70 from above downwards....

now for the stops and profits: stop loss 50 pips from the opening and profit 40....


Help YOU PEOPLE!!! I will personally test and fit each pair later.... the results will be posted here....




write your calc, i'll correct it for you ...
 
eddy:
prescribe stoploss immediately, if the price reaches the trawl - remove stoploss
If sell, stop loss should be higher than the opening price when the order is opened...
 
then create a variable equal to the price at which you want to close the order and compare the price with it