Hi all. Help me to limit placing pending stop orders with the same price. I need a function which when a new pending order price is detected tries out the existing ones, and if they are not set, puts them, if they are - exit. In case the program is functional, the fee is MUST be paid.
I don't see any reason not to put up a bid on Job. They will do it instantly and not expensive, the main thing is to determine what is the same price.
Hi all. Help me to limit placing pending stop orders with the same price. I need a function which after the price of a new pending order would do a search of the existing ones, and if there is no such price - put, if there is - exit. In case the program is functional, the fee is MUST be paid.
There is help for those who are mastering mql4 on their own. In Job they negotiate commercially. Or directly in private with someone who you think can help you on commercial basis.
Thanks for the advice. Did what you said...... doesn't open.
Made p5 variable global.......... doesn't open.
int ot;
int start()
{
ot = OrdersTotal();
int p5=Bars+20;
if(ot==0 && Bars== p5)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point,"jfh",1 );
return(0);
}
Has anything changed? The absurd point remains.
==================
268 posts on the forum and still haven't learned how to insert code?!
I need to open an order after 20 bars from the current value of the Bars variable
How to code this?
Thank you.
Remember the time of the current bar and keep track of when the twentieth bar opens. That is, we create a variable, set it to zero, and make +1 on each new bar. When the variable is higher than 19, open a position.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi all. Help me to limit placing pending stop orders with the same price. I need a function which when a new pending order price is detected tries out the existing ones, and if they are not set, puts them, if they are - exit. In case the program is functional, the fee is MUST be paid.
I don't see any reason not to put up a bid on Job. They will do it instantly and not expensive, the main thing is to determine what is the same price.
Hi all. Help me to limit placing pending stop orders with the same price. I need a function which after the price of a new pending order would do a search of the existing ones, and if there is no such price - put, if there is - exit. In case the program is functional, the fee is MUST be paid.
Good evening all.
Can you tell me why in the FIRST T REATMENT the ORDER OPENS and in the SECOND TREATMENT the ORDER DOES NOT OPEN?
FIRST CASE
if(ot==0
&& Bars== 2000
&& X== false)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point, "jfh",1 ); // open order up
SECOND
if(ot==0
&& Bars== Bars+10
&& X== false)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point, "jfh",1 ); // open the order upwards.
Thank you.
Good evening all.
Can you tell me why the first time the mailer opens and the second time the mailer does not open?
FIRST CASE
if(ot==0
&& Bars== 2000
&& X== false)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point, "jfh",1 ); // open the order up
SECOND CASE
if(ot==0
&& Bars== Bars+10
&& X== false)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point, "jfh",1 ); // open the order up.
Thank you.
And if you ask a question in your mind - when does Bars== Bars+10? Shouldn't we be lazy and make another variable?
And if I put a question in my mind - when does Bars== Bars+10? Maybe we should not be lazy and make one more variable?
Thanks for the tip. did as you said...... doesn't open.
Made p5 variable global.......... does not open.
int ot;int start()
{
ot = OrdersTotal();
int p5=Bars+20;
if(ot==0&& Bars== p5)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-1500*Point,Bid+300*Point, "jfh",1 );
return(0);
}
Thanks for the advice. Did what you said...... doesn't open.
Made p5 variable global.......... doesn't open.
Has anything changed? The absurd point remains.
==================
268 posts on the forum and still haven't learned how to insert code?!
solnce600:
Thanks for the tip. did as you said...... doesn't open.
Made p5 variable global.......... does not open.
HOW the hell can the p5 variable get bigger than Bars??? Where will the terminal get those 20+ extra bars from???
HOW the fuck can the p5 variable get bigger than Bars??? Where is the terminal going to get those 20+ extra bars???
I need to open an order after 20 bars from the current value of Bars
How can I code it?
Thank you.I need to open an order after 20 bars from the current value of the Bars variable
How to code this?
Thank you.Remember the time of the current bar and keep track of when the twentieth bar opens. That is, we create a variable, set it to zero, and make +1 on each new bar. When the variable is higher than 19, open a position.
Another time traveller )))