Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 448

 
Vitek2010:
No it does not. I will explain - your forum is like a hope for the last competent stronghold of prog. and insertion of size - that's how the writing PERIOD_W1 sees itbut neither use of size nor use of fixed datums in the form of dates get any desired effect. I posted a specific question about Friday - by the way your code doesn't compile because it says 'version' - unknown property, so if you don't know how to put DayOfWeek and 5 (Friday's number) into the code other options won't help .


So you're saying the wrong thing.

Files:
vitek2010.mq4  2 kb
 

Good afternoon everyone. I'm posting an indicator that unfortunately hangs and doesn't draw arrows in time, but only when you refresh the chart... Switching to different TFs.

If someone can make the indicator update itself at the end of each candle..., well say 5-10 seconds before the candle closes? Or maybe there is another way to solve this problem?

Thanks in advance.

Files:
 
Vinin:


So you're saying the wrong thing.


I put in the indicator - what it shows - is not clear. my variant had the condition of continuation or change in the previous movement . i.e. below or above the zero line . and you have everything above and on all weeks it's not that simple . you should not deviate from the base (my) variant and simplify things . you need to do on the basis of my indicator . Sincerely.
 
alsu:

Something like this, I guess.


Putting the lines
int Ticket[5];
ArrayInitialize(Ticket,0);

instead ofint Ticket; errors come out:

'=' - left square parenthesis expected for array('=' - Left square bracket, expected for array)

'>' - left square parenthesis expected for array ('=' - Left square bracket expected for array)

'>' - unexpected token('>' - Unexpected token)

')' - assignment expected('' - assignment expected )

'continue' - 'break' or 'continue' used within some loops only )

and a lot more.

 

Why does the advisor open an endless number of orders, help me fix it

thanks

extern double tp = 100;
extern double l = 0.1;




int start()
{
// 1.3600
if(OrderMagicNumber() ==1 >0){return;}
else
{
OrderSend ("EURUSD",OP_BUYLIMIT,l,1.36000,5,0,1.36000+tp*Point,"my order",1);
OrderSend ("EURUSD",OP_BUYSTOP,l,1.36000,5,0,1.36000+tp*Point,"my order",1);
}
if(OrderMagicNumber() ==2 >0){return;}
else
{
OrderSend ("EURUSD",OP_SELLLIMIT,l,1.36000,5,0,1.36000-tp*Point,"my order",2);
OrderSend ("EURUSD",OP_SELLSTOP,l,1.36000,5,0,1.36000-tp*Point,"my order",2);
}
return;
}

 
addict:

Why does the advisor open an endless number of orders, help me fix it

thanks

extern double tp = 100;
extern double l = 0.1;




int start()

add if(OrdersTotal()==0)




// 1.3600
if(OrderMagicNumber() ==1 >0){return;}
else
{
OrderSend ("EURUSD",OP_BUYLIMIT,l,1.36000,5,0,1.36000+tp*Point,"my order",1);
OrderSend ("EURUSD",OP_BUYSTOP,l,1.36000,5,0,1.36000+tp*Point,"my order",1);
}
if(OrderMagicNumber() ==2 >0){return;}
else
{
OrderSend ("EURUSD",OP_SELLLIMIT,l,1.36000,5,0,1.36000-tp*Point,"my order",2);
OrderSend ("EURUSD",OP_SELLSTOP,l,1.36000,5,0,1.36000-tp*Point,"my order",2);
}
return;
}

 
denis77515:

add if(OrdersTotal()==0)

buy order is opened by one, and for sell - again, an infinite number of orders
 

Good afternoon.

I don't understand how this works

03:00:24 '9473965': order sell 0.01 GBPUSD opening at 0.00000 sl: 1.65314 tp: 0.00000 failed [Invalid S/L or T/P]

with this code

RefreshRates();
tick=OrderSend(Symbol(),OP_SELL,Lot,NormalizeDouble(Bid,Digits),30,ssll,0,CMM,MAGIC,0,Blue);
     
why the opening price is zero
 

Good afternoon.

Can you help to create such a function?

How many bars of the current chart from the last known server time (TimeCurrent()) to a certain day by the first bar ofthat day(TimeDay(Time[80])?

Thank you in advance!

 
abeiks:

How many bars of the current chart from the last known server time (TimeCurrent()) to a particular day by the first bar opening that day(TimeDay(Time[80])?


iBarShift should help
Reason: