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

 
Roger >> :

Increase the slippage to 50, you have 5 digits, so 0.3 pips is not good enough.

But then the orders will be closed by the worse price offer.

I want them to close only at better price, otherwise they won't close.

 
Then learn, learn and learn again. Write a unit for dealing with requotes and decision-making.
 
Wouldn't it be easier to RefreshRates() before OrderClose(); and then you will close at the most recent price
 

If he is artificially requalified, it won't help.

 
Roger >> :

If it is artificially requalified, it won't help.

Well, sooner or later they will do it anyway...

And while they requote, you can write in your log according to the event.

For example: Attempt #;price;price_requote;date_time

;)

 
kombat писал(а) >>

Well, sooner or later they will do it anyway...

And while they are retargeting you can write in your event log.

For example: attempt #;price;price_requote;date_time

;)

Of course. But an EA usually closes an order if there are any conditions, crossing of lines or time, so it is difficult for the EA to calculate the best price to close an order. If it closes when the price reaches it, then it may be done so that it stands to the death.

 

Help fix the code to open a deal every hour. PLEASE HELP someone!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Files:
 
Please tell me the algorithm for finding the maximum (minimum) of Close[i]/Close[i+1] ratio on an interval of N bars.
 
Roger >> :

Absolutely. But usually the EA closes an order if any conditions are met, crossing lines or time, so it is difficult for the EA to tell which price is better to close. If it closes when the price is reached, we can make it freeze to death.

So, I see. Perhaps, this problem does not bother anybody.

I think I know how to do it. >> I will write it down and post it.

 
Mr-Franklyn >> :
Please tell me algorithm to find maximal (minimal) of Close[i]/Close[i+1] ratio on N bar interval.

Write all values of Close[i]/Close[i+1] into array double num_array[N] and then use function ArrayMaximum/ArrayMinimum

Reason: