Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 51

 

Hello.

I added two buffers Uptrend and Dntrend and conditions to the indicator to colour the ropes, but there are holes in the peaks :(

How to remove them?


Files:
 
Zar:

Hello.

I added two buffers Uptrend and Dntrend and conditions to the indicator to colour the ropes, but there are holes in the peaks :(

How to remove them?



It's OK, I think.

Files:
 
Vinin:


It's OK, I think.

Yes, thank you, it all makes sense now :)
 
Good afternoon all .... does anyone know how to block the script from running for a set period of time?
 
i999i:
Good afternoon all .... does anyone know how to block the script from running for a set period of time?
The script, if not looped, works ONLY once (when placed on the chart).
You can see the solution for limiting the running time of the EA here.
 
TarasBY:
The script, if not looped, works ONLY once (when placed on the chart).
You can see the solution for limiting the running time of the EA here.


thanks, got it
 

Hi all! I'm not a beginner, but my function doesn't work:

string fsD2c(double dpD)
{ string slResult=""; int nlPos=-1;
  slResult=DoubleToStr(dpD,2);
  nlPos =  StringFind(slResult,".");
  if (nlPos>=0) slResult=StringSetChar(slResult, nlPos, ","); 
  return(slResult);
}

It's supposed to replace a full stop with a comma, but I get a number without a full stop and without a comma and without any zeros. :)

StringSetChar(...) function is standard.

 
Top2n:


Thanks, but I understand that I have to calculate TP (Ask + TP * Point) for BUY, etc.

As it turns out, TP=100 points is not set at once, and it works at 130 points, for example. However, if we set the TP in manual mode, we can adjust it for 100 pips.

The broker has a StopLeverage at 0.00050.

Maybe, when opening TP it calculates without any spread but at a declared price. Although this is nonsense.

Your brokerage company does not allow to open positions with stop orders at once. Do it one at a time: first you open a position, then you place stop orders.

And why is the stop loss double? He is an int.

 
mt4trade:

Hi all! I'm not a beginner, but the function doesn't work for me:

string fsD2c(double dpD)
{ string slResult=""; int nlPos=-1;
  slResult=DoubleToStr(dpD,2);
  nlPos =  StringFind(slResult,".");
  if (nlPos>=0) slResult=StringSetChar(slResult, nlPos, ','); 
  return(slResult);
}
It's supposed to replace a semicolon with a comma, but it returns a number without a semicolon, without a comma and without any subsequent zeros. :)

The StringSetChar(...) function is standard.

 

It takes a lot of time to test an EA. Maybe there is a script or program that can use the basic algorithm and run it automatically on different timeframes?

In fact, I even found a suitable script in a neighboring branch, but I need to set day ranges for a week instead of time.

It goes like this:

Multy_DATA[0][0] = "DayOfWeek(5)";  Multy_DATA[0][1] = "DayOfWeek(1)";
Multy_DATA[1][0] = "DayOfWeek(1)";  Multy_DATA[1][1] = "DayOfWeek(2)";
Multy_DATA[2][0] = "DayOfWeek(2)";  Multy_DATA[2][1] = "DayOfWeek(3)";
Multy_DATA[3][0] = "DayOfWeek(3)";  Multy_DATA[3][1] = "DayOfWeek(4)";
Multy_DATA[4][0] = "DayOfWeek(4)";  Multy_DATA[4][1] = "DayOfWeek(5)";

But it doesn't work that way.

Asked the question to the author of the script. Judging by the messages, the author is rarely on the forum. Guru, advise how to do it correctly.

The script can be found here: https: //www.mql5.com/ru/code/7614

Reason: