There was a problem loading the comments.

Pattern Forecast Calculations

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Chart Patterns

Emerging Patterns Arrow


  • Let arrowX0 be the pattern_end_time[1] of the pattern.
  • Let arrowY0 be the close-value of candle at pattern_end_time.
  • Let arrowX1 be the value of arrowX0 + (pricegraph[2] length * 0.2).
  • If direction[3] > 0, then let arrowY1 be arrowY0 + (resistance_y0[4] - support_y0[5]), otherwise let arrowY1 be arrowY0 - (resistance_y0 - support_y0).

Example sudo-code:
da0a48909d70a0f6198a18b4d4686a401a810f437954f99fff40fea2a550de7acb4aabf29d3386cc?t=bbf47e9667d6aaa2a5c418dfd80f4920

Next we need to calculate where the arrow intersects on the resistance or support line:

  • Let arrowGradient be (arrowY1 – arrowY0) / (arrowX1 – arrowX0).
  • If direction > 0, then let lineGradient be (resistance_y1 - resistance_y0) / (resistance_x1 - resistance_x0), otherwise let lineGradient be (support_y1 - support_y0) / (support_x1 - support_x0).
  • If direction > 0 then let linePoint be resistance_y1 + lineGradient * (pattern_end_time - resistance_x1), otherwise let linePoint be support_y1 + lineGradient * (pattern_end_time - support_x1).
  • Let arrowXIntercept be 1 / (lineGradient - arrowGradient) * (linePoint - arrowY1) + pattern_end_time.
  • Let arrowY1 be lineGradient * (arrowXIntercept – pattern_end_time) + linePoint.



Example sudo-code:
acb12d9906b40c45b7ddff77e1fde7b3d62d1490941cc6fab7b0fd154aa07340beb55a88a7669272?t=48ce0598e3851c0212016773144edd89

The arrow is then drawn from (arrowX0,arrowY0) to (arrowXIntercept,arrowY1)[6]

Completed Patterns Arrow

  • Let arrowX0 be pattern_end_time.
  • Let arrowY0 be the close-value of the candle at pattern_end_time
  • Let arrowX1 be arrowX0 + (pricegraph length * 0.1).
  • If direction > 0 then let arrowY1 be the prediction_price_from[7], else let arrowY1 be the prediction_price_to[8]

Example sudo-code:
db070453753e02bb04eb163ff79f3687a08fce7d3d5486bfd9ddf977624f585ca330eac270acebf4?t=1c050c6d600da73a8782fbcd075a3288
The arrow is then drawn from (arrowX0,arrowY0) to (arrowX1,arrowY1)[9]


Completed Patterns Prediction Area

  • Let predictionTime be pattern_end_time + pattern_length.
  • If the predictionTime is greater than the pricegraph length, then let predictionTime be pricegraph_length * 1.1.
  • Draw rectangle as (pattern_end_time + 5 pixels, prediction_price_from, prediction_price_to, predictionTime) [10]


Key Levels

Emerging Patterns Arrow

  • Let arrowX0 be the pattern_end_time of the pattern.
  • Let arrowY0 be the close-value of candle at pattern_end_time.
  • Let arrowX1 be the value of arrowX0 + (pricegraph length * 0.05).
  • Let arrowY1 be the value of pattern_price[11]
  • The arrow is then drawn from (arrowX0,arrowY0) to (arrowX1,arrowY1)[12]

Completed Patterns Arrow

  • Let arrowX0 be the pattern_end_time.
  • Let arrowY0 be the close of candle at pattern_end_time.
  • Let arrowX1 be arrowX0 + (pricegraph length * 0.1).
  • If direction > 0 then let arrowY1 be prediction_price_from, else let arrowY1 be prediction_price_to.
  • The arrow is then drawn from (arrowX0,arrowY0) to (arrowX1,arrowY1)[13]

Example sudo-code:
2cf660edd61b3b311167c1040958cfaa9233e71d3c0102fa78d3a1182a1eaf9f5da5b6b8d974789f?t=7ab9ed5dd121d68ebaaf359606cb3f38

Completed Patterns Prediction Area

Let predictionTime be pattern_end_time + pattern_length.If the predictionTime is greater than the pricegraph length, then let predictionTime be pricegraph_length * 1.1.Draw rectangle as (pattern_end_time + 5 pixels, prediction_price_from, prediction_price_to, predictionTime) [14]




Appendix A

API Terminology


Pattern_end_time
The pattern end time can be found in all pattern results.
In the XML API it will appear as the following:
c09c1f198f6a0edbaeedb713351c65c6199eaa18939e01a8aaf8f2018b99dd26d3ee3691759bbf37?t=e2587f39dd9fc5f8c6c767564aa17873

In the json API it will appear as the following:
a0f0b37e9504b2eab532f75536696b619cd4d02e58fbfb6a7c9272ceaa5ed5dd86c8aca7764b7753?t=1e80d54c3f29bdd74d02b285e460e59e

Price Graph
For the purpose of displaying the pattern, the Price Graph comprises the candle list 20 candles before the start of the pattern, up to and including the candle at the end of the pattern.

Direction
The Direction can be found in all pattern results. A direction of 1 means the pattern is bullish, a value of -1 means the batter is bearish.
In the XML API it will appear as the following:
807436b2197393c56545a9065382a195226cfbec8b18407fd42243fae433ff190652a07a95430e25?t=930fbc376ce849e9254e42ba127ae059

In the json API it will appear as the following:
9346d10d0109f4f637d0c3065d4d87e5dc64fd8d959a66cba1a05dbfa4be8d4a231ca1712a697c01?t=2f5f54928feead2a909872e8c82c4ab0

Resistance_Y0
The Resistance_Y0 value can be found in all pattern results, but it is better to calculate the value based on the pricegraph data being used.
To calculate the value, extract the UNIX timestamp value of resistance_x0 from the API.
In the XML API it will appear as the following:
0cf3acc9dccd779a49fc05a1ea437749b4cb8fd80bc20a5d7721d5a33089a4ea393afebfac18c227?t=baab83e6557163e457927f9408f2af88

In the json API it will appear as the following (the value will have to be converted to a UNIX timestamp):
05ecd4b1c544b2a57aed98343ccf26a7966098ba877353a2d0a08c1bac7874fec3b5b40cdbe45aad?t=35856ebf618cf4c0bb93c93fef22b2af

Next determine the high-value of the candle at resistance_x0, this will be used as resistance_y0.


Support_Y0
Apply point 1.4 to the support_Y0, only using the support-values instead.

Prediction_Price_From
The prediction_price_from value can be found in completed pattern results only.
In the XML API it will appear as the following:
bad58c07a656e7a1c7bcd63dd94d982175df26f7c8c357fa6ad3cb046783cefdcf06bfdfdce6e885?t=644d9618eb36179776a4a5bbf5f5bb51

In the json API it will appear like this:
ae4cd8ab1bfc1ec6ebf4fd72c0933e6a6886fb7ba5062a3948d39bc10f683a2576b76426fd65a01f?t=3b80a4b7d16f9efc14fa8975eaa2c561

Prediction_Price_To
In the XML API it will appear as the following:
4e5f65fc7f771608ff45164686650d8a651cbd1950d286e4c7ad300b1bdbbc877b23cce9cb25658f?t=24312b8d5658986bb362b6bd5f763669

In the json API it will appear as the following:
30081d64461f99efe8b3761b00396461a105101fc2fc71257fb5f8186cfe70163c4ae3ac06573017?t=2d57a979204367b6688b554dad70ffea

Pattern_Price
In the json API it will appear as the following:
e5b62780d46981aa56b2e63f39497b20fcee6fec7b4fd9a718f11e37690e38241367c36efe7c4c29?t=d7a9e33623de8025328db2878dc3a0e9


Appendix B – Images

Images 116b8c339123ddbfe58e651b2466ad05384d79b2a20c55087c559415eb26b4931a48f0bd44e5f366b?t=72f237aa2f5a311c30bff503e0bad54e

This represents the point resistance_x0, resistance_y0.This represents the point support_x0, support_y0.This is the pattern lengthThis is the pricegraph length at the time the pattern was identified.This represents the pattern_end_time time.This represents the calculated point arrowX0, arrowY0.This represents the calculated point arrowX1, arrowY1[15].This represents the calculated point arrowXIntercept, arrowY1.

Images 2

4e3b3c9aad6256f8fa8c47c875df6019dd716a543b44e1a4f124fe752061f4edb9dfc0c60c2cf918?t=d99938fda8d57ddd45ee363c972dbc95
This represents the pattern_end_time time.This represents the calculated point arrowX0, arrowY0.This represents the calculated point arrowX1, arrowY1.This is the pricegraph length at the time the pattern was identified.

Images 3

dfc20ff392c7dc31ff0ea0abe019f999b73e715b318d1b2e46e1c92ac36375b6b2fed909f4af241f?t=9c96420559e14bab47324dcce3ff11ba

This represents the point (pattern.pattern_end_time + 5 pixels, pattern.prediction_price_to)This represents the point (pricegraph_length * 1.1, pattern.prediction_price_from)

Images 4

7c4f7dc6a5c5df95125bb9739479ad6d3d17c0907123c213bdee4283931c29b8371775170b3055be?t=ca28137e195da2d868e8c7e301f3eab2
This represents the pattern_end_time time.This represents the calculated point arrowX0, arrowY0.This represents the calculated point arrowX1, arrowY1.This is the pricegraph length at the time the pattern was identified.

Images 5

37ec2396bf5a26d45d02b4af70c20c59197227c37d7bbdebc42f53affb6018550efdadbbd980cf21?t=cb8a19d93f752da871e496b52f56eee5
This represents the point (pattern.pattern_end_time + 5 pixels, pattern.prediction_price_to)This represents the point (pricegraph_length * 1.1, pattern.prediction_price_from)


Images 6

a9970defa26224842233c35f6dfe8e560c0307da8276990539a3c85a91b61fde2f759183e479db76?t=8fe47c8b3e5afc120ff740b4e862711f
This represents the pattern_end_time time.This represents the calculated point arrowX0, arrowY0.This represents the calculated point arrowX1, arrowY1.This is the pricegraph length at the time the pattern was identified.



[1] See Appendix A-1.1 for terminology
[2] See Appendix A-1.2 for terminology
[3] See Appendix A-1.3 for terminology
[4] See Appendix A-1.4 for terminology
[5] See Appendix A-1.5 for terminology
[6] See Appendix B - Image 1
[7] See Appendix A-1.6 for terminology
[8] See Appendix A-1.7 for terminology
[9] See Appendix B – Image 2
[10] See Appendix B – Image 3
[11] See Appendix A – 1.8 for terminology
[12] See Appendix B - Image 6
[13] See Appendix B – Image 4
[14] See Appendix B – Image 5
[15] Point arrowX1, arrowY1 may not represent actual values, but are shown for display purposes only.

Share via

Related Articles

© Autochartist