[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 510

 
Reshetov:
Some brokers have one server for both demo and real. Check with your broker's support team.
If it is not a secret, which broker has your demo? I went with a friend to 2 other brokers - same mess.
 
nemo811:
If it's not a secret, which broker has your demo? I went through 2 more brokers with my friend - same mess.
I have written in a private message - it is impossible to discuss brokers on this forum
 

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);
}

 
TESKATLIPOKA:

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 at the log. What does it say?
 
Reshetov:
Look in the magazine. What does it say?


It's compiling. It says it's initiated.

 
TESKATLIPOKA:


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.

 
Reshetov:

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.

 
TESKATLIPOKA:


What's there to see? If I knew, I wouldn't ask.

The code I gave you, uncomment it and see what it says in the logbook
 
Reshetov:
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])



 
TESKATLIPOKA:


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])