# TD Sequential

Oct 6th, 2017
440
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. _SECTION_BEGIN("TD sequential setup");
2. // TD Sequential Setup
3. Plot( C, "Price", colorBlack, styleCandle );
4. y = ParamField("Price field");
5.
6. Buy = Sum( y < Ref( y, -4 ), 9 ) == 9 AND Ref( y, -9) > Ref( y, -13 );
7. Sell = Sum( y > Ref( y, -4 ), 9 ) == 9 AND Ref( y, -9) < Ref( y, -13 );
8.
9. PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, L, H ) );
10. //LISTING 2
11. // Ermanometry
12. Plot( C, "Price", colorBlack, styleCandle );
13. dt = DateTime();
14. Start = dt == SelectedValue( dt );
15.
16. EF = Param("Seed Seg EF", 48, 1, 900 );
17. DE = Param("Seed Seg DE", 40, 1, 900 );
18.
19. Ratio = EF/DE;
20. InverseRatio = 1/Ratio;
21.
22. x = BarsSince( start );
23. CD = DE * Inverseratio;
24. BC = CD * Inverseratio;
25. AB = BC * Inverseratio;
26. FG = EF* Ratio;
27. GH = FG * Ratio;
28. HI = GH * Ratio;
29. IJ = HI * Ratio;
30.
31. FH = sqrt( FG * FG  + GH * GH  );
32.
33. Erman =
34. x == int(FH) OR /* Erman */
35. x == int(GH) OR /* Erman */
36. x == int(HI) OR /* Erman */
37. x == int(IJ) OR /* Erman */
38. x == int(DE+EF+CD) OR /* Erman */
39. x == int(GH+HI+IJ) OR /* Erman */
40. x == int(CD+DE+EF+FG+GH+HI) OR /* Erman */
41. x == int(EF+FG+GH) OR /* Erman */
42. x == int(CD+DE+EF+FG+GH) OR /* Erman */
43. x == int(CD+DE+EF+FG+GH+HI) OR /* Erman */
44. x == int(GH+IJ+CD+AB+EF); /* Erman */
45.
46. Plot( Erman, "Erman", colorRed, styleHistogram | styleOwnScale );
47.
48. FH = sqrt( FG * FG  + GH * GH  );
49.
50. Coles =
51. x == int(FH+FG+GH) OR /* Coles */
52. x == int(AB+BC+CD+DE) OR /* Coles */
53. x == int(AB+BC+CD+DE+GH) OR /* Coles */
54. x == int(FG+GH) OR /* Coles */
55. x == int(GH+HI) OR /* Coles */
56. x == int(FG+BC+CD) OR /* Coles */
57. x == int(FG+BC+CD+DE) OR /* Coles */
58. x == int(CD+BC) OR /* Coles */
59. x == int(DE+BC) OR /* Coles */
60. x == int(sqrt(CD*CD+DE*DE)+CD+DE) OR /* Coles */
61. x == int(sqrt(EF*EF+FG*FG)+EF+FG); /* Coles */
62.
63. Plot( Coles, "Coles", colorGreen, styleHistogram | styleOwnScale );
64.
65.
66. _SECTION_END();
RAW Paste Data Copied