Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1296

 
Aleksei Stepanenko:

From two points on a line, you can find the price of an arbitrary third point on that line, also in the future (and vice versa).

Thank you very much! It all worked out. I would like to find ZigZag transferred to the Expert Advisor. Does anybody have a ZigZag ported to an EA without iCustom? Thank you!
 
Does anyone have a ZigZag transferred to an EA without iCustom? Thank you!
 
Hello! There isa modified indicator"iexposuregmini.mq4" based on iExposure.mq4 indicator built into the terminal. Can you please advise how to move the position (window) of the informer to the bottom left corner of the chart window? And after deletion of the indicator from a chart, the indicator bar remains... How can it be fixed? I am very grateful in advance!
Files:
 
MarsNet:
Hello! There isa converted indicator"iexposuregmini.mq4 "
.
Files:
 
Александр:

It compiles without any problems

'MSBB.mq4' MSBB.mq4 1 1
'MovingAverages.mqh' MovingAverages.mqh 1 1
0 errors, 0 warnings, 187 msec elapsed 1 1

Alexander, the compilation process determines correctness of spelling and punctuation, but not workability. It's good to check the functionality through testing. The log will show you everything. What is more impressive in your result is the time. What kind of machine are you using?

 
Michail_David:

Alexander, compilation determines correctness of spelling and punctuation, but not workability. It is a good idea to check the work in a test. The log will show you everything there. What is more impressive in your result is the time. What kind of machine are you using?

QuadCore Intel Core i7-3770, 3800 MHz (37 x 103)/ Overclocked a bit. Still iCustom is slow....
 
Question, is it possible to get the approximate commission and swap for a symbol before placing orders? Or can we just multiply the spread by 3 or by five and be sure that the amount is higher.
 
Valeriy Yastremskiy:
My question is whether we can get the approximate values of commission and swap for the symbol before we place orders. Or you can just multiply the spread by 3 or by five and be sure that the sum is larger.

You can. Read the help on MarketInfo. There are parameters on commissions and swaps. And do a check like this

//+------------------------------------------------------------------------+

//|   Проверка на наличие денежных средств для открытия минимального лота  |

//+------------------------------------------------------------------------+

   if(Margin_Percent<MarketInfo(Symbol(),MODE_MARGINREQUIRED)*(MarketInfo(Symbol(),MODE_MINLOT)))

     {

      Print("Не хватает средств. Свободные средства = ",AccountFreeMargin());

      return;

     }

 
Michail_David:

You can. Read the help on MarketInfo. There are parameters on commissions and swaps.

Yes, there are swaps. I did not find any commissions. And I found trade mode on the symbol. Didn't know it was in 4.

 
Michail_David:

You can. Read the help on MarketInfo. There are parameters on commissions and swaps. And do a check like this

These are margin requirements, it's clear that the sufficiency of funds before the trade is calculated. But I would like to get commission before order/order.

Reason: