[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 920

 
gheka:

There is another way, take your sound, put it into NERO (sound editing software), if available, make one sound

5 of them.

If I'm not mistaken, "i++" works on every tick, i.e. the sound will be pronounced for 5 ticks in a row.

And also just in case, look here https://book.mql4.com/ru/operators/for


Nah, if you edit the sound, how am I going to learn how to programme? :)

Thanks for the link, I'll look into it.

 
_SS_:
Suppose I have 1 open order and then a second pending order opens, how do I make the take profit of the first order equal to the take profit of the second order? and so on, 1,2=3 1,2,3=4 1,2,3,4=5 ?
 
Nilog:


Nah, if I edit the sound, how am I going to learn how to program? :)

Thanks for the link, I'll look into it.


look at my previous answer with the codes
 
gheka:

I'm not kidding, my Expert Advisor really does not work!

The only answer is "it should work", but it does not.

The only answer to this question was "it should work", but it does not.

i think that the problem may be something else?

extern double StopLoss=50.0;
extern double TakeProfit=50.0;
extern double Lots=1;
extern int total;

int start()
{
double Price_1, Price_2, min, max;
RefreshRates();
Price_1=Bid;
Price_2=Ask;

min=iLow(NULL,0,2);
max=iHigh(NULL,0,2);
total=OrdersTotal();
if(total<1)
{

if(Price_1>max)
OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Bid-StopLoss*Point,Ask+TakeProfit*Point,"My order#",16384,0,Green);

if(Price_2<min)
OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Ask+StopLoss*Point,Bid-TakeProfit*Point,"My order#",16384,0,Green);
}
}
return(0);

yes it works, the smiley face is always smiling but it does not work, positions do not open

it means there are already open positions in the account
Necron:
it means there are already open positions on the account

I opened a new demo account, and the deposit has never been touched,

i dont know if it has something to do with the forex brokerage company?

 
gheka:

look at my previous answer with the codes

I don't get it, what does this int sum do?
 
Nilog:

Added. Still only repeats once. :(

if (Balance < Loss)
      {
           for(int i = 0; i < 5; i++) 
           {   -  ты наверно это забыл поставить 
           i=PlaySound("LossLimitReached.wav");  -- поставь "i" перед "PlaySound"
           Sleep (1000);
           }   -  и это тоже                 
      }
Put '' i '' = in front of ''PlaySound'' then
 
gheka:

then put '' i '' = before 'PlaySound'.

when compiling 'PlaySound' - function returns no result
and can i be assigned to this expression?
 

Hi.

If anyone has come across or maybe there is:

EA template for automated trading


This template is designed for the general purpose of creating EAs, this template contains the most important and necessary functions of working with an EA

Among the features of this template are:

Using / NOT using - Stoplosses / Take Profits
Using / NOT using - Trade by time
Using / NOT using - MarketWatch trading technology (enable - Only for the knowledgeable)
Using / NOT using - Pending orders / positions by market - on choice
Using / NOT using - Autolot, or using a fixed lot
Using / NOT using - Close positions on a reverse signal
Using

Please send me a file or link. Thanks in advance!

 
Nilog:

when compiling 'PlaySound' - the function returns no result
and can this expression be assigned to i?

then try this)))

if (Balance < Loss)
{


PlaySound("LossLimitReached.wav"); Sleep(1000);

PlaySound("LossLimitReached.wav"); Sleep (1000);

PlaySound("LossLimitReached.wav"); Sleep (1000);

PlaySound("LossLimitReached.wav"); Sleep (1000);

PlaySound("LossLimitReached.wav"); Sleep (1000);

}

this might work))))

 
gheka:

Try this then)))

I tried it that way. Only one signal comes out anyway. :((((((((((