retesere20

--deleted

Jun 26th, 2018
109
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (ThisHigh == A)
  2. {
  3.  
  4. if (ShowAlerts == true)
  5. {
  6. Alert("MyAlrt1" + CurrentBar.ToString(), Priority.High, "D3SpotterV3: High Found", MyAlert1, 3, Brushes.Black, Brushes.Yellow);
  7. }
  8.  
  9. for (int i = QueueLength-1; i >= 1; i--)
  10. {
  11. HighBarsAgo[i] = HighBarsAgo[i-1];
  12. }
  13.  
  14. HighBarsAgo[0] = CurrentBar - A;
  15.  
  16. Draw.Dot(this, "Hdot" + CurrentBar.ToString(), true, A, High[A] + (TickSize * MarkerDistanceFactor), UpperDotColor);
  17. DrawOnPricePanel = false;
  18.  
  19. Draw.Dot(this, "IHdot" + CurrentBar.ToString(), true, A, Indicator[A], UpperDotColor);
  20. DrawOnPricePanel = true;
  21.  
  22. if (++QHLength >= 2)
  23. {
  24. for(int i = 0; i < Math.Min(QHLength, QueueLength); i++)
  25. {
  26. BarsAgo = CurrentBar - HighBarsAgo[i];
  27.  
  28. IndicatorDiff = Indicator[A] - Indicator[BarsAgo];
  29.  
  30. switch (PType)
  31. {
  32. case D3SpotPriceType.High_Low:
  33. PriceDiff = High[A] - High[BarsAgo];
  34. break;
  35.  
  36. case D3SpotPriceType.Open_Close:
  37. PriceDiff = Close[A] - Close[BarsAgo];
  38. break;
  39.  
  40. case D3SpotPriceType.SMA1:
  41. PriceDiff = SMA(High, 1)[A] - SMA(High, 1)[BarsAgo];
  42. break;
  43.  
  44. default :
  45. PriceDiff = High[A] - High[BarsAgo];
  46. break;
  47. }
  48.  
  49. if (((IndicatorDiff < IndicatorDiffLimit) && (PriceDiff >= PriceDiffLimit)) || ((IndicatorDiff > IndicatorDiffLimit)
  50. && (PriceDiff <= PriceDiffLimit)))
  51. {
  52. if ((BarsAgo - A) < ScanWidth)
  53. {
  54. if (ShowAlerts == true)
  55. {
  56. Alert("MyAlrt2" + CurrentBar.ToString(), Priority.High, "D3SpotterV3: Divergence Found", MyAlert2, 10, Brushes.Black, Brushes.Red);
  57. }
  58.  
  59. Draw.Line(this, "high"+CurrentBar.ToString() + BarsAgo.ToString(), true, BarsAgo, High[BarsAgo] + (TickSize * MarkerDistanceFactor), A,
  60. High[A] + (TickSize * MarkerDistanceFactor), divergenceColor, divergenceDashStyle, divergenceLineWidth);
  61.  
  62. Draw.TriangleDown(this, CurrentBar.ToString(), true, 0, High[0] + (TickSize * MarkerDistanceFactor), Brushes.Red);
  63.  
  64. DrawOnPricePanel = false;
  65. Draw.Line(this, "IH"+CurrentBar.ToString() + BarsAgo.ToString(), true, BarsAgo, Indicator[BarsAgo], A, Indicator[A], divergenceColor,
  66. divergenceDashStyle, divergenceLineWidth);
  67.  
  68. DrawOnPricePanel = true;
  69.  
  70. }
  71. }
  72. }
  73. }
  74. }
RAW Paste Data