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

 

When opening positions under Market Execution, the slippage limit option normally does not work. Hardware does not work. - On the server.

You should read the rules of your brokerage company. Including (it should be stipulated) time of request execution - usually not more than 5-10 seconds.

So, you should be glad that you're still being "paid" for a penny .....

 
xeon >> :

Thought you'd be impatient, waiting a year :-).

I just wanted to say that in time you will realise that these are such insignificant little things.... :-)

In general it is forbidden to discuss brokers here, but there is a lot of such information in internet, look for it, you will find much interesting :-)

I understand)) It's just that, for some reason, such "insignificant little things" are always executed not in our favour. After all, the broker usually closes for himself at a better price. I don't remember anything slipping in my favour. It's just a trifle! It's no big deal.

 

You can fight slippage with the use of pending orders. Also, however, not a panacea. But it is of course useful!

Moreover. Try to close them not manually, but with scripts.

Maybe it will be better.....

 
rid >> :

You can fight slippage with the use of pending orders. Also, however, not a panacea. But it is of course useful!

Moreover. Try to close them not manually, but with scripts.

Maybe it will be better.....

Tried to close it with script. Set slipp=0 in the settings; it's still slipping... a lot of it. I've been having a hard time lately. Look at the markets now. I don't know, maybe it seems to me, but market behavior has changed recently (month or two). A lot of things have stopped working. What a scary way to live..... ))

 
What fun to live in!
 
Life is beautiful.
 
rid >> :

Where do you place this function?

You have an extra word in your message, "code".

 

I need to find the first candle to open the week's trading,

But some brokers start on Sunday and others on Monday. For Sunday.

I have used

if(TimeDayOfWeek(Time[ i])==0   &&   TimeDayOfWeek(Time[ i+1])!=0) {

I can check if such a "Sunday" candle exists.

Can anyone suggest a better way?

Thank you!

 
chief2000 >> :

I need to find the first candlestick to open the week,

If for the current week, then:


if (iTime(Symbol(), PERIOD_W1, 0) == Time[i]) {

...

}


For previous weeks, the value of the last argument in iTime() - week number must be changed

 
Reshetov >> :

If for current week:


if (iTime(Symbol(), PERIOD_W1, 0) == Time[i]) {

...

}


For previous weeks, you need to change the value of the last argument in iTime() - week number

Great! Thank you!

Reason: