ALGORITHM II

From MarketPawns
Revision as of 15:10, 26 August 2023 by Admin (talk | contribs)
Jump to navigation Jump to search

This article is not finished

For an accurate understanding of the algorithm, you should get acquainted with UMG General Concepts.

Step I. Search For Point 3 of the External Attraction Model (EAM) and the Sarting Point of the Previous Trend.

1.1. The program looks for the first possible extreme, satisfying Single Bar Rule. Such an extreme is a candidate for potential point 3 ( potential t.3).
1.2. Next, the program checks the bars from right to left (i.e., in the past) from the bar containing the extreme candidate for point 3 to one of the following events:
1.2.1. Found the last intersection (breakthrough) point by the price level of the candidate for point 3.
In this case, the report displays:
PREVdata: FullDataPrev
The program proceeds to substep 1.3.
1.2.2. The program reached the starting point of the chart (i.e., the price did not intersect the level of point 3 after the starting point of the chart).
In this case, the report displays:
PREVdata: NoFullDataPrev
The program proceeds to substep 1.3.
1.2.1. The price checked 300 bars preceding point 3, but the level of step 3 did not intersect at this segment. The program looks for an absolute extreme (opposite to step 3) on the segment from the 300th bar before point 3 to point 3. The program proceeds to substep 1.3.
1.3. The program looks for an absolute extreme (opposite to point 3 extreme) on the segment:
- from the last intersection by the price level of the candidate for point 3 (inclusive) (if came from 1.2.1.), or :: - from the starting point of the chart (if came from 1.2.2.), or
- from 300 bars(if came from 1.2.3.)
to point 3 (excluding).
1.3.1. Absolute extreme found. The candidate for point 3 is confirmed; moreover, the found confirming extreme is the assumed (if coming from 1.2.2. or 1.2.3.) starting point of the preceding trend.
The program checks for the absence of extremes equal to point 3 between the assumed starting point of the previous trend and point 3.
1.3.1.1. If such an extreme is found, this candidate for point 3 is discarded, and this point 3 is discarded.
1.3.1.2. If such an extreme is not found, the program proceeds to step 2.
1.3.2. Absolute extreme not found. This point 3 is discarded.
Simultaneously with step 1, the program launches the search for the next potential point 3.

Step II. Search For Potentioal Points 5 and 4

The Orientation rule (N1 requirement) for Algorithm II is as follows:
 If point 3 is low, then the level of point 5 should be higher than point 3. 
 If point 3 is high, then the level of point 5 should be lower than point 3.

Search for Point 5. The bar following the bar of Point 3 (and in repeated applications of this step - the bar specified in this algorithm) is checked for not overcoming the level of point 3 (since N1 requirement for Algorithm II must be observed).

2.1. If the price has overcome the level of point 3, the program discards the considered step 3 (due to N1 requirement).
2.2. If N1 requirement is met for the analyzed bar, it is checked for compliance with N1 requirement as a potential point 5 (hereafter - point 5 or t.5).
2.2.1. If the analyzed bar is not an extreme according to N1 requirement (as a potential point 5), the program checks the next bar from the beginning of step 2.
2.2.2. If the analyzed bar is determined as an extreme according to N1 requirement (as a potential point 5), then this bar is checked for reaching (but not necessarily overcoming) the level of point 3. There are 2 options:
2.2.2.1. If the level of point 3 is reached, the program analyzes the next bar according to this step (i.e., from the beginning of step 2).
2.2.2.2. If the level of point 3 is not reached, the analyzed bar is a potential point 5, and the program moves to substep 2.3.
2.3. Search for Point 4. The program searches for a bar, which was the last to cross the level of the considered potential point 5. Let's denote this bar as lcb5 (line-crossing-bar-5). If lcb5 coincides with the bar of point 3, we denote the bar following lcb5 as look4. Otherwise, look4 = lcb5. The program searches for a bar with the maximum (if point 3 is low) or minimum (if point 3 is high) price in the interval from lcb5 to potential point 5. Then this bar is checked for being an extreme according to N1 requirement as a potential pont 4 (hereafter – point 4 or t.4). There are 2 options:
2.3.1. The bar is an absolute extreme (as a potential point 4). In this case, potential point 4 is found.
2.3.1.1. If step 2 has already been determined (this is possible when this step is triggered during the search for an alternative model), the program checks the line chart for extra points in the section from step 2 to step 4. There are 2 options:
2.3.1.1.A. If extra points are found, the program processes the next bar after potential point 5 according to step 2.
2.3.1.1.B. Extra intersections are not found; the program moves to substep 2.4.
2.3.1.2. If substep 2.3.1. is triggered during the search for the basic model, the program moves to substep 2.4.
2.3.2. The bar is not an absolute extreme (as a potential point 4). In this case, the program looks for another candidate for point 5 according to this step (i.e., according to step 2).
If the program has processed 50 bars in a row according to this step (step 2), and the program has not moved to another step of the algorithm, then this potential point 3 is discarded.
If there are 150 or more bars between potential point 3 and the analyzed bar, and potential points 4 and 5 are not found, then this potential point 3 is discarded.
2.4. Real-Time Verification of t.5
The potential t.5 bar is checked for the presence of bars between the analyzed bar and the potential t.4 bar, which contain price values more distant (or even equally distant) from the potential t.4 than the most distant from t.4 value of the analyzed bar. This is a check of the potential t.5 for beeing the potential absolute extreme. The following options are possible:
2.4.1. If the extreme is potentially absolute, the program proceeds to step 3.
2.4.2. If the extreme is not potentially absolute, the program checks the next bar starting from this step (i.e., step 2).

Step III. Confirmation of Point 4. Searching for Alternative t.5 and t.5"

The program checks whether the bar of potential t.5 has reached the level of t.4. Two scenarios are possible:

3.1. The Bar of Potential t.5 Has Reached t.4.
In this case:
The model is built through absolute t.5.
The t.5 bar confirms t.4. The presence of a bar confirming t.4 indicates that:
Point 4 is confirmed,
Point 5 is confirmed.
The program proceeds to sub-step 3.3 (since there is already possible to display the model through t.5 on the chart).
3.2. The Bar of Potential t.5 Has Not Reached t.4.
In this case, the program checks the next bar for reaching the level of t.4. The following options are possible:
3.2.1. The Considered Bar Reaches the Level of Potential t.4.
In this case:
The model is built through absolute t.5.
The considered bar confirms t.4. The presence of a bar confirming t.4 indicates that:
Point 4 is confirmed,
Point 5 is confirmed.
The program proceeds to sub-step 3.3.ext, but first goes through sub-step 3.3.
3.2.2. The Considered Bar Does Not Reach the Level of t.4.
In this case the program checks the next bar for overcoming the level of potential t.5. Two scenarios are possible:
3.2.2.1. If the t.5 level is overcome, the analyzed bar is considered as a new potential t.5. The program processes this bar according to step 2.
3.2.2.2. If the t.5 level is not overcome, the analyzed bar is checked for reaching the level of t.4 according to sub-step 3.2.
In parallel (i.e., an additional branch is created), the program proceeds to sub-step 3.3 (since there is already an option to display the model through t.5 on the chart). The model in this branch receives a "draw_flag" label.
3.3. Construction of the Trend Line (TL).
A Trend Line (TL) is constructed from t.3 to t.5. Each bar between t.3 and t.5 is checked for breaking the TL. Two scenarios are possible:
3.3.1.The Price Crosses the TL.
In this case, the TL through t.3 is not constructed. The program searches for a candidate for point 3' (hereafter - t.3'). T.3' is selected in such a way that the TL' (constructed from t.3' to t.5) is not crossed by the price in the 3-5 segment. Rule No.1 for t.3' is not applied. T.3' cannot belong to the same bar as t.4. Two scenarios are possible:
3.3.1.1. T.3' is found, this model is classified as built through t.3'. The program proceeds to step 4, or to sub-step 3.3.extended if coming from 3.2.
3.3.1.2. T.3' is not found. In this case, the program searches for new potential t.5 and t.4 according to step 2.
3.3.2. The Price Does Not Break the TL.
In this case, this model is classified as built through t.3 (absolute extreme). The program proceeds to step 4, or to sub-step 3.3.ext. if coming from 3.2.