// find the line and place an order when price touches if (ObjectFind (buy_stop) > 0 ) // if there is a line buy_stop. if ( ObjectGet (buy_stop, OBJPROP_PRICE1) == Ask )// touch the line // this option does not work if (ObjectGet (buy_stop, OBJPROP_PRICE1) <= High[0]) && (ObjectGet (buy_stop, OBJPROP_PRICE1) >= Low[0]) -- { OrderSend (Symbol(),OP_BUYSTOP, lots, Ask+Point*order,3, Bid-sl*Point, Bid+tp*Point);// order is sent ObjectDelete (buy_stop); // line is removed }
It's how it compiles. it says everything is initiated.
I have written to you in person. I think few people here are interested in lines and orders through them.
Why do you need to see what is being compiled and initiated there? It's hard to guess three times that you need to watch when something is ticking and not flipping?
As for the private line, forget how to contact it once and for all - personal consultations cost a lot of money.
I am not at all interested in your lines and orders - this is your problem. If I have free time and a good mood, I can suggest something useful. If I have neither, then fuck off - I am not for hire.
Why do you need to see what is compiling and initiating there? It's hard to guess three times that you need to look when you have something in there that is not fiddling?
About personal communication, you can forget once and for all how to contact it - personal consultations cost a lot of money.
{ OrderSend (Symbol(),OP_BUYSTOP, lots, Ask+Point*order,3, Bid-sl*Point, Bid+tp*Point);// the order is sent ObjectDelete (buy_stop); // the line is removed }
it generates a lot of errors. it does not compile.
it compiles like this
if (ObjectGet (buy_stop, OBJPROP_PRICE1) <= High[0]) if (ObjectGet (buy_stop, OBJPROP_PRICE1) >= Low[0])
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.
Some brokers have one server for both demo and real. Check with your broker's support team.
If it's not a secret, which broker has your demo? I went through 2 more brokers with my friend - same mess.
Hello everyone.
Same question again. as advised, it's not working so far.
What's wrong? ... price is "ticking the line", but no order has been placed.
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
string sell_stop = "sell_stop"; //name the line manually
string buy_stop = "buy_stop";
//buy------------------------------------------------------------------------------------------------
// find the line and place an order when price touches
if (ObjectFind (buy_stop) > 0 ) // if there is a line buy_stop.
if ( ObjectGet (buy_stop, OBJPROP_PRICE1) == Ask )// touch the line
// this option does not work if (ObjectGet (buy_stop, OBJPROP_PRICE1) <= High[0]) && (ObjectGet (buy_stop, OBJPROP_PRICE1) >= Low[0]) --
{
OrderSend (Symbol(),OP_BUYSTOP, lots, Ask+Point*order,3, Bid-sl*Point, Bid+tp*Point);// order is sent
ObjectDelete (buy_stop); // line is removed
}
return(0);
}
Hello everyone.
Same question again. as advised, it's not working so far.
What's wrong? ... price is moving on the line, but no order is being placed
Look in the magazine. What does it say?
It's compiling. It says it's initiated.
It's how it compiles. it says everything is initiated.
I have written to you in person. I think few people here are interested in lines and orders through them.
Why do you need to see what is being compiled and initiated there? It's hard to guess three times that you need to watch when something is ticking and not flipping?
As for the private line, forget how to contact it once and for all - personal consultations cost a lot of money.
I am not at all interested in your lines and orders - this is your problem. If I have free time and a good mood, I can suggest something useful. If I have neither, then fuck off - I am not for hire.
Why do you need to see what is compiling and initiating there? It's hard to guess three times that you need to look when you have something in there that is not fiddling?
About personal communication, you can forget once and for all how to contact it - personal consultations cost a lot of money.
What's there to see? If I knew, I wouldn't ask.
What's there to see? If I knew, I wouldn't ask.
Uncomment the code I gave you and see what the log says
2012.01.16 23:31:02 EURUSD,M15: initialized
as I wrote - initialized
2012.01.16 23:32:14 Expert line EURUSD,M15: loaded successfully
2012.01.16 23:32:16 Expert line EURUSD,M15: removed
It starts and deletes.
but it does not set the order
but in the variant
if (ObjectGet (buy_stop, OBJPROP_PRICE1) <= High[0]) && (ObjectGet (buy_stop, OBJPROP_PRICE1) >= Low[0])
{
OrderSend (Symbol(),OP_BUYSTOP, Ask+Point*order,3, Bid-sl*Point, Bid+tp*Point);// order is being sent
ObjectDelete (buy_stop); // line is removed
}
Writes a lot of errors. It does not compile.
compiles like this
if (ObjectGet (buy_stop, OBJPROP_PRICE1) <= High[0])
if (ObjectGet (buy_stop, OBJPROP_PRICE1) >= Low[0])
2012.01.16 23:31:02 EURUSD,M15: initialized
as I wrote - initiated
2012.01.16 23:32:14 Expert line EURUSD,M15: loaded successfully
2012.01.16 23:32:16 Expert line EURUSD,M15: removed
It starts and deletes.
but it does not set the order
but in the variant
if (ObjectGet (buy_stop, OBJPROP_PRICE1) <= High[0]) && (ObjectGet (buy_stop, OBJPROP_PRICE1) >= Low[0])
{
OrderSend (Symbol(),OP_BUYSTOP, lots, Ask+Point*order,3, Bid-sl*Point, Bid+tp*Point);// the order is sent
ObjectDelete (buy_stop); // the line is removed
}
it generates a lot of errors. it does not compile.
it compiles like this
if (ObjectGet (buy_stop, OBJPROP_PRICE1) <= High[0])
if (ObjectGet (buy_stop, OBJPROP_PRICE1) >= Low[0])