
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
That's what I mean. You have to take into account existing constraints, which, generally speaking, change all the time.
Is there some function that analyses all possible constraints?
Same for modifications.
--
(I have 16 functions - 3 for each good order (OP,SL,TP) and 2 for each market order (SL,TP),
and then some more functions analysing combinations of permits).
yes, i also have a separate function for setting an order checking all possible limitations and a separate one (partially similar to the first one) for modifications. i won't give the code - there is so much "left" stuff there that only i need, that - ouch. :-) but in general - it's difficult without it in real trading Expert Advisors. :-)
Yes, I also have a separate function for setting an order, which checks all possible limitations and a separate one (partially similar to the first one) for modification. I will not give you the code - there are so many "left" tricks, which only I need, that - ouch. :-) but in general - it's difficult without it in real trading Expert Advisors. :-)
Actually, I wanted to check myself - whether I've considered everything. If you don't check them, you can encounter a series of bounces (sometimes with the prospect of getting banned).
I will briefly list my checks.
1) StopLevel. For example, when modifying the SL BuyStop.
It doesn't just check the distance. You should analyze the current position of StopLevel and direction of stop order movement.
If SL is outside the StopLevel corridor, you can move it close or move it indefinitely.
If the SL is within the corridor, the upwards movement is rejected. Down movement is accepted, but with consideration of the StopLevel: if the modification distance within the distance corridor is set at 3 p, and the corridor is 30 p, then the actual value accepted for execution is defined by the StopLevel corridor boundary.
2) FreezeLevel.
3. ratio of StopLevel and TICKSIZE. The order may be outside all corridors, but not multiple of TICKSIZE - then it is trouble. It needs to be rounded towards the modification direction. Critical for "non-currency".
4. Lots. Minlote +/- minlote. Take into account that partial and counter closures are limited to minlots too (although in my opinion it is illogical, but that's the way it is).
After personal checks, the order is issued if each check ended positively (no ban).
Fully published function libraries:
b-Graphics.rar - work with graphical objects.
b-Indicators.r ar - work with indicators.
The ArrayLR() function.
This function generates an array of linear regression values. The function accepts the following mandatory parameters:
Example of using the ArrayLR() function.
Let's mark the price levels of the linear regression for the previous 30 bars.
P.S. Attached is a script to test the ArrayLR() function.
Fully published function libraries:
b-Graphics.rar - work with graphical objects.
b-Indicators.r ar - work with indicators.
Very cool! >> Thank you!
Igor, there is a good indicator that can combine several candles into one. But it only works on the hourly chart. Is it possible to make it universal?
Thank you.
?
?
ooh... sorry...
Such an indicator has already been written, I don't remember by whom and I don't remember where I saw it... I thought you'd find it yourself or someone would give you the link...
The ArrayLR() function does not work accurately.
1. Doesn't take into account the temporal location of the bars. It works incorrectly when bars are missing.
2. the algorithm used to calculate coefficients has a drawback in the form of rounding error accumulation, see 'Help me write a linear regression' (the very bottom of Rosh page confirms this pitfall).
3. I propose an algorithm without these drawbacks.
4. If you replace X[i]=Time[i+1]; with X[i]=i+1; the algorithm is similar, but without error accumulation.
5. Bars are skipped not only on weekends :-(((
Here is my variant
here is a picture
Work example
Checking script attached
Here is my variant
OK, Sergei! Let there be two variants of this function.
My variant is good because it is identical to built-in graphic object OBJ_REGRESSION. If someone needs to take prices from this object, my function will help them, while yours, alas... But it could be used for something else... Thank you!