Multicurrency advisor question - page 9

 

Thank you. I think I've got it! In that case, I'm certainly not threatened by any AccountFreeMargin restrictions here!

As long as I don't lose the whole depo. But that's not what I was trying to do...

 

There's a problem again! I was about to send the EA to be checked. And then I remembered that the libraries should be placed in the libraries folder, and I have them in -

#include  <b-Lots.mqh> 
#include  <stdlib.mqh>
#include < a-SimpleTrailing.mqh>

I put the libraries in the right folder and wrote in the code -

#libraries <a-SimpleTrailing.mqh>
#libraries  <b-Lots.mqh> 
#include  <stdlib.mqh>

I got two identical errors after compiling my EA! -

'' - empty token C:\Program Files\MetaTrader - North Finance\experts\MULTY.mq4 (43, 1)

I don't understand anything! I tried the same on another MT4 terminal - same thing! And I took another EA and tried it in the same way - same result...

It says - empty there.... I do not know what to do. Please advise - who knows, what is the problem here...

 

I've been poking around the pages of examples.

Found a design like this -

#include "libraries\b-Lots.mqh"
I did the same thing. It seems to be working.
 

Good afternoon. There has been a misunderstanding. With the ATR and StDeviation indicators !

On standard dollar pairs, the scale range is from 0 to 60 (approximately) - this is too small for me....

On the crosses, - the range for me, - enough from 0 to 7000 ! - see charts.

The Expert Advisor normally works with crosses but on ordinary currency pairs very often values "merge" due to the compressed scale. I cannot compare them.

Please advise what may be done?

 

Good morning. Please, advise. I use an indicator in an Expert Advisor, where the symbol (euro or pound or franc ...) is set in the iCustom function

double Complex_1 =iCustom(NULL,0,"Complex_Common",2,1); //фунт на 1-м баре

In this case, it is pound (figure "2" is second from the end)

I need to put the symbol name in correspondence with the chart, on which the Expert Advisor is standing.

I.e., the digit corresponding to the symbol is automatically inserted into double Complex=iCustom(); depending on the chart the Expert Advisor is attached to.

I.e., we need a function that returns the "symbol" of the current chart. I cannot find such a function! Does it exist?

Please advise.

 
rid писал (а) >>

Good morning. Please, advise. I use an indicator in an Expert Advisor, where the symbol (euro or pound or franc ...) is set in the iCustom function

In this case, it is pound (figure "2" is second from the end)

I need to put the symbol name in correspondence with the chart, on which the Expert Advisor is standing.

I.e., the digit corresponding to the symbol is automatically inserted into double Complex=iCustom(); depending on the chart the Expert Advisor is attached to.

I.e., we need a function that returns the "symbol" of the current chart. I cannot find such a function! Does it exist?

Please advise.

Symbol() returns the symbol of the current chart.

 

Yes, indeed! I've been dull this morning. It happens to all sorts of...

Thank you, Vinin!

 

Good afternoon. Slight problem.

My Expert is working on opening prices.

int start()
  {
  if(Time[0] == prevtime)   return(0);
   prevtime = Time[0];//если появился новый бар , включаемся
//-------------------------------------------------------------------   
  if (UseTrailing) TrailPositions(); //трейлинг стоп
if (NumberOfPositions(NULL,-1,-1)< Orders_) {// если оtкрытых позиций  менее Orders_


//---------проверяем условие на покупку----------------------------
//покупаем
//--------проверяем условие на продажу------------------------------
//продаем ...
}
  return(0);
}// Конец функции INT START()

Something about the code editor window not working. Ok.

However I need - at the same time - trailing stop function to be implemented for all ticks.

Please advise how to implement this algorithm ? I.e. how and where to put the line -

if (UseTrailing) TrailPositions(); //трейлинг стоп
 

I would put the first line at the start, before checking a new bar.

Only, if the trailing bar is not stepped, you will bore the broker with modifications on every tick.

 

Well, that's okay. I have a trawl with a pitch =5-10

I've tried it that way. But sometimes there is a malfunction in the trawl.

Reason: