You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Then, you are the first contender for the title of Best Pupuas Coder 2015
P/S Please don't fall off your chair laughing :)
Get mad, get mad if you couldn't understand four lines of code (intentionally four instead of two to make it easier to understand)
What's the problem? It's not clear what number 86400 is? Or 3600?
86400 is a number of seconds in a day. 3600 - in one hour.
ps. What kind of laughter is that? You have to cry here.
Frequently used and useful functions:
The SetStDayTime() function didn't work very fast, so
I'm posting a redesigned one (thanks to Sergei):
Features:
Receiving confirmation (TRADE_RETCODE_PLACED ) in OrderSend() return code and order ticket,
and for the OrderSendAsync() function in OnTradeTransaction(), this does not at all mean that
the order is actually TRANSFERED to an exchange.
Therefore, an additional check of the order status is needed (just as for other actions on the order).
There is a typo inCheckOrderState().
Instead ofinit_volume == init_volume
it should beinit_volume == cur_volume
Frequently used and useful functions:
RedesignedCheckOrderState() to be called OrderRealSelect() with the option of not getting/receiving data on the order
If we want to modify or delete an order, we only need to know that it exists:
If, after deleting, we need to get data on the order, then:
In case of an error:
Frequently used and useful functions:
Redesigned feature set for counting inefficient transactions:
Frequently used and useful functions:
If we want the pending order to be active on more than just the current day, then
you should specify in your request (expiration day is specified in the example)
(Thanks Sergey) As it turned out recently this implementation works for the current futures and the next one.
It does NOT work for farther futures!
Frequently used and useful functions:
Writing settings to a file:
Reading settings from a file:
Frequently used and useful functions:
Linking an EA to an account:
Frequently used and useful functions:
Function for translating points into the price of an instrument: