Skip to main content

UMG Methodology

ALGORITHM I

Full migrated text of the first core UMG algorithm, including orientation rule, procedural steps and later-stage model logic.

Section UMG Methodology
Updated 16.05.2026

Orientation Rule (N1 Requirement)#

If point 1 is low, then the level of point 3 should be equal to or higher than point 1.

If point 1 is high, then the level of point 3 should be equal to or lower than point 1.

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

Step I. Find Point 1. Search for a Confirming Extreme.#

1.1. The program searches for the first possible extreme that satisfies Single Bar Rule. This extreme is a candidate for point 1.

1.2. When a candidate for point 1 is found, all bars to the left, that is, in the past, of the bar containing the t.1 candidate extreme are checked until one of the following events occurs.

1.2.1. The place of the last intersection of the price level of the t.1 candidate is found. High or low equal to high or low of t.1 is an intersection.

1.2.1.1. If the extreme is not found, the program searches for a new candidate for point 1.

1.2.1.2. If the absolute extreme is found, it is the beginning of the preceding trend. The point 1 is confirmed.

1.2.1.2.1. The program checks for the absence of extremes equal to point 1 from the beginning of the preceding trend. If such an extreme is found, this candidate for point 1 is discarded.

1.2.1.2.2. If such an extreme is not found, the program proceeds to process the next bar after point 1 according to point 2 of the Algorithm.

1.2.2. The program has reached the starting point of the chart. In this case it searches for a confirming extreme from right to left to the starting point of the chart. The options are similar to sub-steps 1.2.1.1 and 1.2.1.2.

1.2.3. The program has checked 50 bars preceding the bar of the potential point 1, and none of the above events have occurred. The program searches for a confirming extreme from right to left in the area of 50 bars before the potential point 1. The options are similar to the sub-steps 1.2.1.1 and 1.2.1.2.

Step II. Searching for Points 3 and 2.#

If the program returns to this step during the construction of an alternative model, this branch of the algorithm stops.

The bar being analyzed after point 1, or in repeated applications of this step, is checked for non-exceedance of the level of point 1.

2.1. If the level of point 1 is exceeded, the program discards this point 1.

2.2. If the level of point 1 is not exceeded, the bar being analyzed is checked by rule N1 as an extreme for point 3.

2.2.1. If this bar is not an extreme according to rule N1 as a potential point 3, the program checks the next bar in accordance with step 2.

2.2.2. If this bar is an extreme according to rule N1 as a potential point 3, then the program may additionally check exceedance of the previous candidate for point 3 if this step is repeated during a return branch.

2.2.2.1.A. If the check is not passed, the program processes the next bar in accordance with this step and further according to the algorithm.

2.2.2.1.B. If the check is passed, the program proceeds to the search for point 2.

2.2.2.2. The program searches for an absolute minimum, if point 1 and point 3 are high, or maximum, if point 1 and point 3 are low, in the range from point 1 to point 3 as point 2. Then this bar is checked for extremity according to the N1 rule.

2.2.2.2.A. If the bar is an extreme, then this is a potential point 2, and the potential point 3 becomes a confirmed point 3. The program proceeds to step 3.

2.2.2.2.B. If the bar is not an extreme, the program begins to search for another candidate for point 3 and returns to the beginning of step 2.

If the program has processed 50 bars in a row according to this step and potential points 2 and 3 have not been found, then this potential point 1 is discarded.

If there are 150 or more bars between the potential point 1 and the bar being analyzed, and the program has not yet moved to another step of the algorithm, this potential point 1 is discarded.

Step III. Building TL. Search for t.4#

3.1. Checking for Fragmentation of the Base. After finding candidates for points 1, 2, and 3, a check is performed for fragmentation of the Base. There should be no extremes, co-directed with t.1, between the levels of t.1 and t.3.

3.1.1. If such extremes are present, the program checks each one for the presence of a confirming counter-directed extreme on the relevant section. If there is at least one confirmed extreme that fragments the base, the Base is fragmented, the confirmed t.3 becomes a cancelled t.3, and the program searches for a new t.3 according to step 2.

3.1.2. If the check is successful and no confirmed fragmentation extremes are found, the program proceeds to sub-step 3.2.

3.2. Building and Checking TL on the 1-3 Section. The parameters of the Trend Line passing through t.1 and t.3 are calculated. TL is checked for breakthroughs on the 1-3 section.

3.2.1. If TL is broken, the bar of the confirmed t.3 is checked for breaking the level of t.2.

3.2.1.1. If the level of t.2 is broken by the bar of the confirmed t.3, the confirmed t.3 becomes a cancelled t.3 and the program searches for a new t.3 by processing the bar that broke the level of t.2 according to sub-step 3.4.

3.2.1.2. If the level of t.2 is not broken by the bar of the confirmed t.3, then the next bar is processed according to sub-step 3.2.3.

3.2.2. If TL is not broken, the bar following the bar of the confirmed t.3 is processed according to sub-step 3.3.

3.2.3. The analyzed bar is checked for breaking the level of the confirmed t.3 and, if that does not happen, for breaking the level of t.2. If t.2 is broken, the program searches for such point 3', hereinafter t.3', through which a line can be drawn from t.1 to t.3' without extra touches on the allowed section and without extra breakthroughs on the later section.

3.2.3.2.2.A. If t.3' is found, then the TL is rebuilt through t.3' and the algorithm searches for a potential t.4 by processing the bar that broke the level of t.2 according to sub-step 3.4.

3.2.3.2.2.B. If point t.3' is not found, then the confirmed t.3 becomes a cancelled t.3 and the program searches for a new t.3 by processing each previously unprocessed bar for the cancelled t.3 according to step 2.

If between t.1 and the analyzed bar there are 150 or more bars and the program has not yet moved to another step of the algorithm, this potential t.1 is discarded.

3.3. Checking TL on the Section After t.3. The analyzed bar is checked for overcoming TL.

3.3.1. If TL is not overcome, the analyzed bar is processed according to sub-step 3.4.

3.3.2. If TL is overcome, then either the program performs a search for t.3' when the level of t.2 has not yet been reached, or it performs a search for a new candidate for t.3 when the level of t.2 has been reached.

3.4. Searching for Potential or Alternative t.4. If the program is searching for t.4 and the analyzed bar is further from t.1 than 5 times the distance between t.1 and t.3, then this potential t.1 is discarded. If the program is searching for an alternative t.4 and the analyzed bar is further from t.1 than 10 times the number of bars between t.1 and t.3, then the search for an alternative t.4 is terminated.

3.4.1. If the bar is not an extreme according to rule N1, the program checks it for breaking through TL. If TL is not reached, the next bar is processed according to step 3.4. If TL is broken, the analyzed bar is processed similarly to step 3.3.2.

3.4.2. If the bar is an extreme according to rule N1, this is potentially t.4 and the algorithm proceeds to step 3.5.

3.5. Checking the Position of t.4. The program checks the position of the potential t.4 relative to the extreme of t.2.

3.5.1. If the level of the potential t.4 is closer to the level of t.1 than the level of t.2, a candidate for t.4 for the Wedge model is found. The program checks potential absoluteness of this t.4 and then checks whether the line t.2-t.4, called the Aims Line or AL, is crossed by price on section 2-4.

3.5.1.1. If AL is crossed, the program checks the analyzed bar for reaching TL. If TL is not reached, the next bar is processed according to sub-step 3.4. If TL is reached, the program searches for a new candidate in t.3 or t.3'.

3.5.1.2. If there is no line crossing, the bar t.4 is checked for reaching TL. If the bar t.4 reached TL, then the Wedge model is fixed, the level of intersection of TL and AL is calculated, and the program searches for t.3' with the same points 1, 2, 3 or searches for a new t.3.

3.5.1.2.2. If the t.4 bar did not reach TL, the next bar is analyzed for reaching TL while checking that the distance equal to (t.1-t.3) * 10 is not overcome. If the distance is overcome, the program returns to the search for t.3. If TL is reached later, the Wedge model is fixed in the same way. If TL is still not reached, the analyzed bar is checked for reaching the level of t.4 and the cycle continues.

3.5.2. If the level of the potential t.4 is further from the level of t.1 than the level of the potential t.2, the program transitions to step 4.

3.5.3. If the level of the potential t.4 is equal to the level of the potential t.2, the program checks whether the bar of the considered candidate in t.4 has broken through or touched TL. If not, it searches for the next candidate for t.4. If yes, it searches for a new t.3 according to step 2.

Step IV. Checking for Intersection of the Aim Line (AL) by Price on Section 2-4#

The program checks for intersections of the Aim Line by price on the section from t.2 to t.4.

4.1. If AL is intersected by price on section 2-4, the program checks the analyzed bar, which is also the bar of the potential t.4, for a breakout of TL.

4.1.1. If TL is not reached, the program processes the next bar according to step 3.4.

4.1.2. If TL is broken, t.3 becomes the cancelled t.3 and the program searches for a new candidate for t.3 by processing the analyzed bar according to step 2.

4.2. If AL is not intersected by price on section 2-4, the program proceeds to step 5.

Step V. Model Fixation at the TL Breakthrough. Search for t.5. Search for t.6.#

The bar t.4, or in repeated applications the analyzed bar specified in the algorithm, is checked for reaching TL.

5.1. If TL is reached, there is a touch of TL. The program checks whether the level of t.4 has been surpassed in the section from t.4 to the moment the price reaches TL.

5.1.1. If the level of t.4 is not surpassed, then the model is considered formed without 6 and the program proceeds to step 6.

5.1.2. If the level of t.4 is surpassed, the program looks for an absolute extreme in the section from t.4 to the bar that reached the level of t.4 as point 5. When searching for a potential t.5, it is necessary to take into account the requirement that if the bar t.4 belongs to the extreme co-directed with t.5, t.5 must break through the level of this extreme.

5.1.2.1.1. If t.5 belongs to the bar which broke through the level of t.4, the program checks whether that bar also contains an absolute extreme co-directed with t.4. In that case, that extreme becomes a new potential t.4, AL is rebuilt through this t.4 and checked for the absence of price intersections in section 2-4.

5.1.2.1.1.A. If AL intersects with price on section 2-4, t.3 becomes the cancelled t.3 and the program searches for a new t.3.

5.1.2.1.1.B. If AL does not intersect with price on section 2-4, the program proceeds to step 6.

5.1.2.1.2. If t.5 belongs to a bar between the bar t.4 and the bar that broke through the level of t.4, the program proceeds to step 6.

5.1.2.2. If the extreme is not found, the program is looking for the next candidate for t.4 by processing the bar that surpassed the level of the potential t.4 according to step 3.4.

5.2. If TL is not reached, then if the analyzed bar contains a potential t.4 the program checks the next bar according to step 5. Otherwise, the bar is simultaneously verified for extremity according to rule N1 as t.5 and for potential absoluteness relative to t.4.

5.2.1. If the bar is an extreme and it is potentially absolute, then this bar is a potential t.5. The program checks this bar for reaching the level of t.4.

5.2.1.1. If the level of t.4 is reached, the program checks whether the bar which contains t.5 also contains an extreme co-directed with the bar t.4. If such an extreme is present, that absolute extreme is taken as a new potential t.4, AL is rebuilt through it and checked for intersections in section t.2-t.4. If not, then confirmation of t.4 by t.5 occurs and the program proceeds to step 6.

5.2.1.2. If the level of t.4 is not reached, the program proceeds to step 6, while also checking the next bar according to step 5 in order to find another model with the same t.1, t.2, t.3 and t.4 but another t.5.

5.2.2. If the bar is not an extreme, or is not potentially absolute, then the program checks it for reaching the level of the potential t.4. If it reaches that level, the program looks for an absolute extreme between t.4 and the point confirming t.4 as t.5 and either proceeds to step 6 or returns to the search for a new t.4. If the bar does not reach the level of the potential t.4, then the program processes the next bar according to step 5.

5.3. Algorithm for determining the presumed real p.6. Apply Algorithm I to the models excluding AM. Identify the price value that is farthest from the t.1 level and that the price reached from t.3 to the first touch of TL after t.4. The extremum identified there is considered the real t.6. The technical parameters P6 and P6t are finalized at the moment the model is fully formed.

If the price has not touched TL after t.4 at the moment of determining the presumed real p.6, the program checks whether the number of bars formed after t.4 is more than 300. If it is more than 300, the presumed real p.6 for this model will not be determined. If it is not more than 300, the program evaluates whether the price has surpassed t.4 and either projects a presumed p.6 from the t.1-t.4 distance or treats potential t.4 itself as the presumed real p.6 when t.4 and t.5 are not confirmed.

For AM the process is similar, but TL is not used when determining the real or presumed p.6. Instead, the level of t.3 of the model under consideration is used.

5.4. Algorithm for determining whether the model is from the start of the trend model or along the trend model. For main models except EAM, the program sequentially checks bars from right to left from the bar containing the extreme candidate at t.2 until it finds a price intersection of t.2 level.

  • If the program has checked 50 bars up to t.1 of the model and such an intersection is not found, the model is considered a trend-following model.
  • If the intersection lies to the left of the presumed starting point of the preceding trend related to this model, the report displays G3: HTModel.
  • If the intersection lies to the right of the presumed starting point of the preceding trend, the model is considered a model from the start of the trend and the report displays G3: BTModel.
  • If the program has checked less than 50 bars up to t.1 of the model and reached the initial bar of the chart without finding the sought-after intersection, the model is considered a trend-following model and the report displays G3: NoData.
  • For EAM, the same applies, but the program looks for an intersection at the level of t.4 instead of an intersection at the level of t.2.

Step VI. Search for Tangents and Construction of the Auxiliary Attraction Model#

6.1. Search for t.2'. The program conducts a search for t.2', meaning tangent and therefore the rule N1 is removed for it, which will yield LC without any intersections with price in the section between t.1 and t.2. Bars are checked from right to left starting from bar t.2 to bar t.1 inclusive. Point 2' can coincide with t.2 if LC through t.2 does not have extra price intersections on 1-2, however t.2' cannot belong to the bar t.1.

6.1.1. If t.2' is found, the program calculates the Line of goals by the tangent from t.2' to t.4, further AL', and checks whether the considered model has the status that it is formed without point 6. If yes, the program proceeds to step 7. If not, it proceeds to sub-step 6.2.

6.1.2. If t.2' is not found, meaning it is impossible to build such a line through points t.2' and t.4 that will not contain extra points on section 1-2, then this is a model without an Auxiliary AM and the program proceeds to step 7.

6.2. Search for t.3' of the Auxiliary AM. The program constructs a line from t.3 or t.3' if it exists to t.5, called TLam, and checks it for price intersections in the section between t.3 and t.5.

6.2.1. If intersections are found, the program searches for such point 3' of the Auxiliary Attraction Model, further t.3'am, through which it is possible to construct a line with no price intersections on the section from t.3/t.3' to t.5.

6.2.1.1. If t.3'am is found, the program constructs the Trend Line of the auxiliary model by the tangent from t.3'am to t.5 and calculates the level of intersection of AL' and TLam', further calculated t.6.

6.2.1.1.1. If the calculated t.6 is found, then a check is carried out for the minimum ratio of the time segment t.2-t.4 to the segment t.4-t.6 for the Auxiliary AM. If the check is not passed, then the model does not have an auxiliary AM and the algorithm proceeds to sub-step 6.3. If the check is passed, the program checks whether the bar t.5 breaks through the level of the calculated p.6. If not, the report displays AUX AM and the program proceeds to sub-step 6.3. If yes, then this AM cannot be built and the program is looking for a new t.4 or stops this branch if the model has draw_flag.

6.2.1.1.2. If the calculated point 6 is not found, TLam is not displayed on the chart, the report displays AUX NoAM, and the program proceeds to sub-step 6.3.

6.2.1.2. If t.3'am is not found, then the report displays AUX NoAM and the program proceeds to step 7.

6.2.2. If intersections are not found, the program calculates the level of intersection of TLam and AL', that is, the level of calculated p.6, and then applies the same options as in sub-steps 6.2.1.1.1 and 6.2.1.1.2.

6.3. Construction of the Auxiliary AM through t.5. The program checks for the presence of t.5', the first possible local extremum in time on the section T.4-T.5. If t.5' is found, the report displays AimsBlock5' 5'; otherwise it displays AimsBlock5' No5'. If t.5' is present, the program follows a similar process as in sub-step 6.2 to construct the Trend Line for the Auxiliary Attraction Model. If successful, the model is labeled as built through t.5' and the report displays AUX5': AUX5'; otherwise it displays AUX5': NoAUX5'. After this, the program proceeds to step 7.

Step VII. Determination of SP and Model Type.#

The program recalls whether the model was built through t.2 or through t.2'.

7.1. If AL built through t.2 does not have intersections with price on section t.1-t.2, or if there is ALam built through t.2', then the type of the model is determined by the position of the intersection point of TL and AL' in relation to t.4.

7.1.1. If the intersection point of TL and AL' lies to the right of t.4, then this intersection point is the calculated point 6 and the program calculates the ratio of time segments from t.1 to t.4 and from t.4 to calculated point 6 for AM.

  • If the section from t.1 to t.4 multiplied by 3 is greater than the section from t.4 to calculated point 6, this model type is AM and the report shows G1: AM.
  • If the section from t.1 to t.4 multiplied by 3 is less than or equal to the section from t.4 to calculated t.6 and at the same time the section from t.1 to t.4 multiplied by 12 is greater than the section t.4-t.6, then this model is AM/DBM.
  • If the section from t.1 to t.4 multiplied by 12 is less than or equal to the section from the intersection to t.4, then this model is DBM.

For formed AM the program also checks bars after t.4 and may either proceed to step 8 when a needed extremum is found or cancel the formed model and restart the search for t.3.

7.1.2. If the intersection point of TL and AL' lies to the left of t.4, this point is qualified as the Sacral Point, further SP.

  • If the section from t.1 to t.4 multiplied by 3 is less than or equal to the section from SP to t.1 and at the same time the section from t.1 to t.4 multiplied by 12 is greater than the section from SP to t.1, then this is EM/DBM.
  • If the section from t.1 to t.4 multiplied by 3 is greater than the section from SP to t.1, this is EM.
  • If TL and AL are parallel, or if the section from t.1 to t.4 multiplied by 12 is less than or equal to the section t.4-t.6 for right convergence, or from SP to t.1 for left convergence, then this model is DBM. In this case the program proceeds to step 8.

7.2. If for this model it was impossible to construct AL or AL' in such a way that there were no extra intersections on section t.1 inclusive to t.2, then the program checks where TL and AL from t.2 intersect.

If the lines intersect to the right, the model may be classified as incorrect AM, AM/DBM or DBM depending on the time ratio checks. If the lines intersect to the left, the program performs an indirect check for Strength of the trend using a pseudo SP. Depending on where that pseudo SP lies relative to t.1-t.3, the model may be assigned EM, EM with undefined strength, weak pseudo ST, or EM/DBM.

7.3. Also, occasionally there are cases when the model for some reason does not fall under any of the above options. Then the model type is not determined.

Step VIII. Search for Alternative Models. Launching a New Branch from the Previous t.1 but with a Different t.3#

The program initiates a search for the subsequent model with the same t.1, but a new t.3. The bar following t.3 or t.3' is analyzed according to step 2 for this purpose.

Concurrently, the program initiates a search for an alternative model in relation to the one already found. For this, it analyzes the bar that has broken through the level of t.4 as a potential t.4 according to step 3.4 and continues further according to the algorithm.

Continue Reading

Related Articles