Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 357
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
picture for example ...
help with code condition .........................................
ma[1]>ma[2] upwards
ma[1]<ma[2] down
picture for example ...
help with code condition ...................................................................................
A bend is an extremum. It has three points A, B and C. To determine that point B is the centre of the bend (extremum), you have to resort to this formula:
Since it is better not to use zero bars to avoid false signals, A is the MAA data on bar 3, B on bar 2 and C on bar 1
picture for example ...
help with the code condition ...................................................................................
3.3. tops and troughs
pako: спасибо
The bend is an extremum. It has three points A, B and C. In order to determine that point B is the centre of the bend(extremum), we have to resort to this formula:
As it is better not to use zero bar to avoid false signals, A is MA data on the 3rd bar, B on the second and C on the first
2 there is one trick !!! - A bend is an extremum - I agree, but it's not an extremum as if it were a fractal - i.e. to take into account only the last 3 bars that formed it,
this segment and segments may contain more than one bar - let me schematically represent it
the bar segments may contain several bars (sometimes 15 bars) and calculation of 3 bars (and in general, reference to the bars should not be done - imho - I could be wrong) is not good
how to catch the transition from A to C with the top of B in the code ...
2 there is one trick !!! - A bend is an extremum - I agree, but it is not an extremum as if it were a bar!!! you cannot represent it as a fractal - i.e. only the last 3 segments that formed will be taken into account,
this segment and segments may contain more than one bar - let me schematically represent it
the bar segments may contain several bars (sometimes 15 bars) and calculation of 3 bars (and in general, reference to the bars should not be done - imho - I could be wrong) is not good
how to catch the transition from A to C with the top of B in the code ...
How can we tell with our eyes that there is a curve bent somewhere?
Probably, our eye simply picks out the segment we need from the line, then uses its extreme points (left and right) to determine the largest/lowest deviation from the tangent through the values of these extreme points. The anticipated extremum is located at the point of the largest deviation.
Maybe this algorithm will work?
How can we tell with our eyes that there is a curve bent somewhere?
Probably, our eye simply picks out the segment we need from the line, then uses its extreme points (left and right) to determine the largest/lowest deviation from the average value of these extreme points. Where the greatest deviation is the expected extremum.
Would this algorithm work?
I hope you can give me an example, maybe it will work, with the code, thank you.
I corrected myself there - not the average, but the tangent. I'm afraid the algorithm will be slow for an indicator.
With the code. The questions here are:
1. the required length of the segment - I don't know it, nor do I know the beginning and end of this segment.
2. I don't know at all what it's all about in order to use it.
I corrected myself there - not the average, but the tangent. I'm afraid the algorithm will be slow for an indicator.
With the code. The questions here are:
1. the required length of the segment - I don't know it, nor do I know the beginning and end of this segment.
2. I don't know at all what it all needs to be used for.
1, the indicator - MA - is a dummy with no frills - that's what it draws the lines,
2, when there is a bend - we need a simple signal up / down - ALL !!! The signal is either on the segment C or D ( on D when C is formed - immediately)
1, the indicator is a MA - no trick - so it draws the lines,
2, when there is a bend - a simple up/down signal is needed - ALL !!!
Very funny.
1. MA over how many bars?
2. If there is a bend, is the signal on the bend? Or on the zero bar?
Very funny.
1. MA for how many bars?
2. If there is a bend, is the signal on the bend? Or at the zero bar?
there's more to it than that - a straight line could be 20 bars, let it be 30 for an example
the signal either at C or D (at D when C is formed - immediately - at the first bar of D) or better at the first bar of C