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

 
Skydiver писал(а) >>

You could try this

OrderSelect(1, SELECT_BY_POS)

if(OrderOpenTime()!=0)

{

///необходимая операция

}

But this is only an option if you only have 1 order!

Then try this way

OrderSelect(0, SELECT_BY_POS)

if(OrderType()<2)

{

///necessary operation

}

 
AndreyK >> :
What function is used to determine the pip value of a financial instrument? For example, for EURUSD the value of 0.0001 is $10 (when trading 1 lot)

MarketInfo(Symbol(),MODE_LOTSIZE)*Point*Lots;

 

People help, I'm writing an EA for five-minute periods, in the strategy tester it trades, when compiling errors correspondingly does not give out, but in reality the transaction does not make, although for the same period in the tester appear transaction.

I use the OrderSend() function to open a position, why can this happen?

 
sten1981 >> :

People help, I'm writing an EA for five-minute periods, in the strategy tester it trades, when compiling errors correspondingly does not give out, but in reality the transaction does not make, although for the same period in the tester appear transaction.

I use the function OrderSend() to open a position, why may this happen?

Because Jupiter is in constellation Leopard, do not you know?

PS: Without a code, only astrologers can help you...

 

Hello all. A question, perhaps a little off-topic, but from a dummy. Who might be able to help...

A few months ago I opened a demo account in MT4 at Al Pari, password is pro... ... lost it... But it was naturally saved and always entered by default. Can anybody advise where to find it?

 
pepsi >> :

Hello all. A question, perhaps a little off-topic, but from a dummy. Who might be able to help...

A few months ago I opened a demo account in MT4 at Al Pari, password is pro... ... lost it... But it was naturally saved and always entered by default. May be, who knows where to find it?

It's a demo, why bother with it? Make a new one, it takes 1 minute.

 

I want to put it up on the Viac

 
komposter писал(а) >>

Because Jupiter is in the constellation Leopard, didn't you know?

PS: Without a code, only astrologers can help you...

total=OrdersTotal();
if(total<1)

//long position

{
if(MA1>MA2 && StochPrev<StohCur && StochPrev<SignPrev )
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,",16895,0,DeepSkyBlue);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print ("long position opened at price",OrderOpenPrice( ));
}
else Print ("Error opening long position:",GetLastError());
return ("0);
}
//short position
if(MA2>MA1 && StochPrev>StohCur && StochPrev>SignPrev && StohCur<SignCur)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,",16895,0,OrangeRed);
if (ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print ("Short position opened at price",OrderOpenPrice());
}
return (0);
}

 
if I am not mistaken, it is the site responsible for the purchase
 
sten1981 >> :

total=OrdersTotal();....

try

if(!IsTradeAllowed()) Print("the trade stream is busy, overloaded or even off!")

Reason: