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
I, on the other hand, got it out of a pile of code:
One question - why slips? And 10 (number of repetitions) should be moved to global variables.
How about this one?
There are different slips. The ones in the loop are... When you have a girl sitting there, you have to repeat it ten times and wait until she puts on her lipstick. When a girl is sitting, she has to repeat it ten times and wait until she puts on makeup. And sometimes the server slows down. This is all for "real DC".
Slips after PlaySound, so that other sounds do not overshadow, PlaySound interrupts the sound of the previous one.
Global variables are cleverly weighted by the terminal. And there is no need, the external algorithm should work normally with orders which are not closed.
Global variables are cleverly weighted by the terminal.
Oh, I forgot -- RefreshRates at the beginning of loop after context capturing, then you won't need to fiddle with Ask and Bid. And other values too.
RefreshRates is not there for anything else. This is how I tried to deal with situations when OrderClose returns false, but the order actually closes. After pause and RefreshRates comes OrderSelect(). I don't know how it is there, but it seems to work.
Ask and Bid are a real wonder, they sometimes need to be normalized :)
---
About ten repetitions and what for in global variables, I do not understand. There are ten of them, with sufficient margin. Is it extern?
What if the order closes in a minute? You can't beat that with a code. This is a terminal communication failure.
gip:
I do not understand about ten repetitions and what for in the global variables.
It simply reduces the number of failures by a factor of two. Of course, not all situations are handled exactly in this block. If an order is closed for a minute, the program has to wait all this time. These waits, even if cut off, delay the loop and everything works out as it should in the end.
---
> To avoid magic numbers and easy tuning.
Adjust this ten? Yes it is with such a margin, that it is easier to change the DC :) And for the sake of megalot, if so had to, and can be in the code to correct.
There is one councillor. We need to make him look decent.
These are the functions from it. There is a way to make it all look palatableI have added two functions to simplify the work
One checks the order type and the second looks for the last open order
Part of the author's reworked functions