Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1355

 
MakarFX:

First determine how many orders you need to open when the condition is met

how it is calculated

It is already defined - I just did not insert this condition in the opening - otherwise someone will blow away an important part of the grail;-))))))))))))))))))

 
Alena Lysenkova:

No you don't. As you have done for the demo, so use it. Please make sure that your Expert Advisor sends trade orders correctly and reacts to the server error codes.

How should it react correctly - tell me more about how it should react?

 

Good afternoon everyone!

I have searched everywhere and have not found any explanations.

Can you please tell me how to open BuyLimit orders, with a bid or an Ask?

Can you please advise whetherSellLimit orders are opened with a bid or an Askom?

And if I place a BuyLimit order at the price 1.4500, will the order be opened (with a bid or an Ask) at the same or higher price? (We do not consider slippage).

And if I place SellLimit at the price of1.4500, will the order open at the same price (B idor Ascom) or lower? (The slippage is not considered).

Thank you in advance.

 
Lerchik:

Good afternoon everyone!

I have searched everywhere and have not found any explanations.

Can you please tell me how to open BuyLimit orders, with a bid or an Ask?

Can you please advise whetherSellLimit orders are opened with a bid or an Askom?

And if I place a BuyLimit order at the price 1.4500, will the order be opened (with a bid or an Ask) at the same or higher price? (We do not consider slippage).

And if I place SellLimit at the price of1.4500, will the order open at the same price (B idor Ascom) or lower? (The slippage is not considered).

I will not take the slippage into consideration. Thank you very much.

You haven't found anything, because it's elementary things every trader should know...

 

You're all so mean...

I'm a newbie, so I'm asking what's what.

Aaaa, guess what... you don't know yourself...))

 
Lerchik:

Good afternoon everyone!

I have searched everywhere and have not found any explanations.

Can you please tell me how to open BuyLimit orders, with a bid or an Ask?

Can you please advise whetherSellLimit orders are opened with a bid or an Askom?

And if I place a BuyLimit order at the price 1.4500, will the order be opened (with a bid or an Ask) at the same or higher price? (We do not consider slippage).

And if I place SellLimit at the price of1.4500, will the order open at the same price (B idor Ascom) or lower? (The slippage is not considered).

I will consider the slippage (we will consider the slippage). Thank you in advance.

Bid, buy, bystop is the same. This is a buy order.

 
Valeriy Yastremskiy:

bylimit, bystop, buy equally. This is a buy order.

That's pretty clear. I asked a specific question.
 
Lerchik:
It is already clear. I asked a specific question.

Same as buy. The same. Ask

Ticket=OrderSend(Symb,OP_BUY,Lots,Ask,2,SL,TP,"QstrBuy",Magic,0,Blue);//Открытие Buy
         if(Ticket>0) // Получилось :)
           {
            Price = Ask;
            Alert(Symbol()," ТФ ",Period(),"Открыт ордер Buy по цене ",Ask,"Ticket = ",Ticket);}
 
Valeriy Yastremskiy:

Same as buy. The same. Ask

So you are saying that the opening of a market order at Ask is equal to the opening of a BuyLimit order.

Something is not quite correct. Let us assume that the Bid price is equal to 1.4500. So, when we open a Buy order from the market, it will stand at the Ask price and ask price of Bid is, let's say, 10 points.

Then the order will stand at 1.4510.

Now BuyLimit order is equal to 1.4500. And the price falls 10 points lower than the Ask price on Ask will open an order. Not by Bid but by Ask.

It does not fit together a bit. They are different things and cannot be compared like that.

Maybe, I am wrong?

 
Lerchik:

So what you are saying is that opening a market order at Ask will equal opening a BuyLimit order.

Something is not right here. Suppose the Bid price is equal to 1.4500. So, when we open a Buy order from the market, it will stand at the Ask price and ask price of Bid is, let's say, 10 points.

Then the order will stand at 1.4510.

Now BuyLimit order is equal to 1.4500. And the price falls 10 points lower than the Ask price on Ask will open an order. Not by Bid but by Ask.

It does not fit together a bit. They are different things and cannot be compared like that.

Maybe I am wrong?

Maybe you should read the documentation first?

Reason: