Questions from Beginners MQL5 MT5 MetaTrader 5 - page 452

 
Artyom Trishkin:

Oh naive one, where did I write about a mistake?

And here's the way to resolve the issue - wrong, stupid and a shoestring. And do not jump too, please, and better engage in self-education in creating algorithms, so that people do not cram bullshit instead of a normal algorithm. Otherwise the same sloppy ones will flourish. However, what you yourself should be - it is your business, and it does not matter to me, but why bring others to stupidity? Especially since the man asked for help and you gave him crap.

The question was what? Figure it out. I consider further discussion a waste of time.

Do I have to write the code of search for indicator window, and then how to calculate RSI?

Write the whole thing for free yourself.

This is a cool enough resource to cope with such a task, especially since I have shown the way.

 
Karputov Vladimir:
Now you can ask questions on the code: GlobalVariable

Not ready to rush into questions yet - need to realise. Found another solution for now.

The question is whether the Label or Text object has a character limit? Because I have only about 50, which is not enough.

 
Hello. I can't get the robot to send orders. I want to understand what's wrong, but when I press the debug button - the panel at the bottom of the monitor, where I'm supposed to check the values of variable structures and arrays - is blocked. I can't check anything. I've only debugged scripts before. What is the problem? Hint)
 

I want to make an indicator. It does not draw anything, it takes another indicator like MACD or stochastic or custom one of the same type, and gives a beep and a pop-up window when the indicator line crosses any significant level.

I am not able to write indicator from scratch (I can only change existing ones), if somebody thinks what to add or remove, I would be grateful. The code is very short :) This is what I've got so far:

string Name = "НазваниеИндикатора";

double Porog = 0;              //уровень, по пересечении которого подается сигнал

int NomerBufera = 0;           //номер буфера, который пересекает искомый уровень

double Znacheniye[];


int init()                  // это ваще надо? :)

  {

   return(0);   

  }


int start()

  {

   int limit;

   int counted_bars=IndicatorCounted();

   if(counted_bars>0) counted_bars--;

   limit=Bars-counted_bars;

   for(int i=0; i<limit; i++)

 

Znacheniye[i] = iCustom(NULL,0,"Name",NomerBufera,0) ; //"Name" или просто Name?

 

if (  (Znacheniye[i] > Porog &&  Znacheniye[i+1]< Porog) || (Znacheniye[i] < Porog &&  Znacheniye[i+1]> Porog)   )

 {

Alert("Что-то наклевывается!", Symbol());

PlaySound ("Alert.wav "); 

}

}


Thanks in advance if anyone responds!

 
Hello. I can't get the robot to send orders. I want to understand what's wrong, but when I press the debug button - the panel at the bottom of the monitor, where I'm supposed to check the values of variable structures and arrays - is blocked. I can't check anything. I've only debugged scripts before. What is the problem? (Please, advise)
Put at least one breakpoint in your code. After that start debugging.
 
Hello. I have written an Expert Advisor, it opens trades on three pairs. I am displaying info on: the deposit, equity, % drawdown, how many trades were opened for each buy and sell pair (see attachment). How do I display % profit of each pair from total deposit? Suppose % profit = -10% on account, for one pair -3%, for the second -9%, for the third +2% ???? Respected gurus, please point me in the right direction. i am just learning.
 
Alexey Solomin:
Hello. I wrote an EA, it opens trades on three pairs. I am showing info on the screen: equity, % drawdown, how many open trades for each buy and sell pair (see attachment). How do I display % profit of each pair from total deposit? Suppose % profit = -10% on account, for one pair -3%, for the second -9%, for the third +2% ???? Respected gurus, please point me in the right direction. i am just learning.

Please insert a picture like this: forum: how to insert a picture.

Through POSITION_PROFIT you will get a profit for each position (and therefore for each pair).

 

Sorry, I didn't specify the platform, I have mql4,"POSITION_PROFIT" is not in the help, maybe it is " OrderProfit" ?

(Please insert a picture this way:forum: how to insert picture. - ok)
 
Alexey Solomin:

Sorry, didn't specify the platform, I have mql4,"POSITION_PROFIT" is not in the help, maybe it is " OrderProfit" ?

(Please insert picture like this:forum: how to insert picture. - ok)

Look at it this way:

StringConcatenate( DoubleToStr( значение * 10.0, 0 ), "%" )



 
Nilog:

I want to make an indicator. It does not draw anything, it takes another indicator like MACD or stochastic or custom one of the same type, and gives a beep and a pop-up window when the indicator line crosses any significant level.

I am not able to write indicator from scratch (I can only change existing ones), if somebody thinks what to add or remove, I would be grateful. The code is very short :) This is what I've got so far:

string Name = "НазваниеИндикатора";

double Porog = 0;              //уровень, по пересечении которого подается сигнал

int NomerBufera = 0;           //номер буфера, который пересекает искомый уровень

double Znacheniye[];


int init()                  // это ваще надо? :)

  {

   return(0);   

  }


int start()

  {

   int limit;

   int counted_bars=IndicatorCounted();

   if(counted_bars>0) counted_bars--;

   limit=Bars-counted_bars;

   for(int i=0; i<limit; i++)

 

Znacheniye[i] = iCustom(NULL,0,"Name",NomerBufera,0) ; //"Name" или просто Name?

 

if (  (Znacheniye[i] > Porog &&  Znacheniye[i+1]< Porog) || (Znacheniye[i] < Porog &&  Znacheniye[i+1]> Porog)   )

 {

Alert("Что-то наклевывается!", Symbol());

PlaySound ("Alert.wav "); 

}

}


Thanks in advance if anyone responds!

Check the code with Print - you have an undersized array - you need to force the size.
Reason: