[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 818

 
If not share. I can write to you.
unnnamed:

Hello!

I've come across an indicator that shows a countdown to the end of the last bar formation. If anyone has one, please share it.

 
Hello! Does anyone have a ready answer? The switch() operator. It has two cases. The first case is closing an order by Take Profit and the second case is closing an order by Stop Loss. But these values(Take Profit and Stop Loss) are variables of the type double And each case should be marked as an integer constant, a character constant or a constant expression. How to make these variables of double type comply with MQL4 rules for execution of switch() operator? In this case, values ofTake Profit and Stop Loss (closing prices as such) are not important. What matters is the very fact of closing an order by Take Profit and Stop Loss. Thank you in advance.
 
dimon74:
Hello! Does anyone have a ready answer? The switch() operator. It has two cases. The first case is closing an order by Take Profit, and the second case is closing an order by Stop Loss. But these values(Take Profit and Stop Loss) are variables of the type double And each case should be marked as an integer constant, a character constant or a constant expression. How to make these variables of double type comply with MQL4 rules for execution of switch() operator? In this case, values ofTake Profit and Stop Loss (closing prices as such) are not important. What matters is the very fact of closing an order by Take Profit and Stop Loss. Thank you in advance.


divide by Point and get an integer value with MathRound(), convert with DoubleToStr() get a character value

SZY: use if operator will be faster, just do not forget to normalize your doubles for proper comparison

 
Hello, I have a problem: I have made a sound in the Expert Advisor, the signal goes when the position is opened, but the sound goes to the headphones, but there is no sound in the speakers, what could be the problem? When I play the sound with the player, it goes to the headphones and the speakers.
 
Most probably the player is configured where the sound is output. And MT uses the device for sound output, which is set by default in Windows. When headphones are plugged in, it's the headphones.
Rus:
Hello, I have a problem: I have made a sound in the Expert Advisor, the signal goes when the position is opened, but the sound goes to the headphones, but there is no sound in the speakers, what could be the problem? When I play the sound with the player, it goes to the headphones and the speakers.
 
MrSoros:
The player is probably set where the sound is output. The MT uses the default sound output device, which is set by default in Windows. When headphones are plugged in, it's the headphones.
Thanks, got it figured out. Not exactly as you described, but close.
 
A huge request to implement in the form of code
Need:
1) advisor to simultaneously place three pending orders with stops 25 and takeovers 15, 35, 50
2) after the second order closes at take (35) the last position (with take 50) is transferred to lossless
Thank you.
 

Professionals, please advise how to implement the following:

At the beginning of a new day we build a channel on yesterday's Minimum and Minimum - as soon as the price crosses its boundary on the opposite side we place an order.

Question: how to remember all channel borders if the price forms a triangle pattern (yesterday's price has not crossed yesterday's one, yesterday's - the day before) and how to monitor price movement relative to all borders?

Please give us an example if there is one or indicate a general pattern.

 
dimon74:
Hello! Does anyone have a ready answer? The switch() operator. It has two cases. The first case is closing an order by Take Profit and the second case is closing an order by Stop Loss. But these values(Take Profit and Stop Loss) are variables of the type double And each case should be marked as an integer constant, a character constant or a constant expression. How to make these variables of double type comply with MQL4 rules for execution of switch() operator? In this case, values ofTake Profit and Stop Loss (closing prices as such) are not important. What matters is the very fact of closing an order by Take Profit and Stop Loss. Thank you in advance.
And your cases already have a value of int type, I suppose?
If yes, then the logic is:
If the position has closed on Take Profit, then the variable is equal to the number of the first case,
if it has closed on Stop Loss, then the variable is equal to the number of the second case.
Then this value is passed to the switch operator, with the number of the case.
 

Why doesn't the story load when I press the Home button?

It downloads until Feb. 12. 2010 for example USDCAD and all.... then stupor, brokerage company is well-known, it has a history

Reason: