SHARE
TWEET

avpremove-lines-2

selnomeria Sep 6th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //**********************************************************************************************//
  2. #region Clear Lines
  3.  
  4. vars:
  5.     Trendline TL_FirstStop(null),       TextLabel TXT_FirstStop(null),
  6.     Trendline TL_SecondStop(null),      TextLabel TXT_SecondStop(null),
  7.     Trendline TL_Target_1(null),        TextLabel TXT_Target_1(null),
  8.     Trendline TL_Target_2(null),        TextLabel TXT_Target_2(null),
  9.     Trendline TL_Target_3(null),        TextLabel TXT_Target_3(null),
  10.     Trendline TL_TargetATR(null),       TextLabel TXT_TargetATR(null),
  11.    
  12.     Trendline TL_BreakevenStop(null),   TextLabel TXT_BreakevenStop(null),
  13.     Trendline TL_TrailingStop(null),    TextLabel TXT_TrailingStop(null),
  14.     Trendline TL_TrailingStop2(null),   TextLabel TXT_TrailingStop2(null),
  15.     Trendline TL_TrailingStop3(null),   TextLabel TXT_TrailingStop3(null),
  16.    
  17.     Trendline TL_ParabolicStop(null),   TextLabel TXT_ParabolicStop(null),
  18.     Trendline TL_VWAPStop(null),        TextLabel TXT_VWAPStop(null),
  19.     Trendline TL_Pivot1RevStop(null),       TextLabel TXT_Pivot1RevStop(null),
  20.     Trendline TL_Pivot2RevStop(null),       TextLabel TXT_Pivot2RevStop(null),
  21.     Trendline TL_Pivot3RevStop(null),       TextLabel TXT_Pivot3RevStop(null),
  22.     Trendline TL_ORStop(null),          TextLabel TXT_ORStop(null),
  23.     Trendline TL_ATRStop(null),         TextLabel TXT_ATRStop(null),
  24.     Trendline TL_CandleRevStop(null),   TextLabel TXT_CandleRevStop(null),
  25.     Trendline TL_HAPivRevStop(null),    TextLabel TXT_HAPivRevStop(null);
  26.  
  27. Method void ClearTrendLines() begin
  28.  
  29.     if (MarketPosition = 1) or
  30.         (MarketPosition = -1) then begin
  31.  
  32.         RemoveLine(TL_LEORB, TXT_LEORB);
  33.         RemoveLine(TL_SEORB, TXT_SEORB);
  34.         RemoveLine(TL_LEPMBreak, TXT_LEPMBreak);
  35.         RemoveLine(TL_SEPMBreak, TXT_SEPMBreak);
  36.         RemoveLine(TL_LECandle, TXT_LECandle);
  37.         RemoveLine(TL_SECandle, TXT_SECandle);
  38.         RemoveLine(TL_LEHeikinAshi, TXT_LEHeikinAshi);
  39.         RemoveLine(TL_SEHeikinAshi, TXT_SEHeikinAshi);
  40.        
  41.         RemoveLine(TL_LEPivot1, TXT_LEPivot1);
  42.         RemoveLine(TL_SEPivot1, TXT_SEPivot1);
  43.         RemoveLine(TL_LEPivot2, TXT_LEPivot2);
  44.         RemoveLine(TL_SEPivot2, TXT_SEPivot2);
  45.         RemoveLine(TL_LEPivot3, TXT_LEPivot3);
  46.         RemoveLine(TL_SEPivot3, TXT_SEPivot3);
  47.         RemoveLine(TL_LEATR, TXT_LEATR);
  48.         RemoveLine(TL_LEPar, TXT_LEPar);
  49.         RemoveLine(TL_SEATR, TXT_SEATR);
  50.         RemoveLine(TL_SEPar, TXT_SEPar);
  51.  
  52.         RemoveLine(TL_LEMA2, TXT_LEMA2);
  53.         RemoveLine(TL_SEMA2, TXT_SEMA2);
  54.  
  55.         RemoveLine(TL_LEDiv, TXT_LEDiv);
  56.         RemoveLine(TL_SEDiv, TXT_SEDiv);
  57.     end;
  58.        
  59.     if (MarketPosition = 0 and PrevMP <> 0) or
  60.         (MarketPosition = 1 and PrevMP = -1) or
  61.         (MarketPosition = -1 and PrevMP = 1) then begin
  62.  
  63.  
  64.         RemoveLine(TL_FirstStop, TXT_FirstStop);
  65.         RemoveLine(TL_SecondStop, TXT_SecondStop);
  66.         RemoveLine(TL_BreakevenStop, TXT_BreakevenStop);
  67.         RemoveLine(TL_TrailingStop, TXT_TrailingStop);
  68.         RemoveLine(TL_TrailingStop2, TXT_TrailingStop2);
  69.         RemoveLine(TL_TrailingStop3, TXT_TrailingStop3);
  70.  
  71.         RemoveLine(TL_ParabolicStop, TXT_ParabolicStop);
  72.         RemoveLine(TL_VWAPStop, TXT_VWAPStop);
  73.         RemoveLine(TL_Pivot1RevStop, TXT_Pivot1RevStop);
  74.         RemoveLine(TL_Pivot2RevStop, TXT_Pivot2RevStop);
  75.         RemoveLine(TL_Pivot3RevStop, TXT_Pivot3RevStop);
  76.         RemoveLine(TL_ORStop, TXT_ORStop);
  77.         RemoveLine(TL_ATRStop, TXT_ATRStop);
  78.         RemoveLine(TL_CandleRevStop, TXT_CandleRevStop);
  79.         RemoveLine(TL_HAPivRevStop, TXT_HAPivRevStop);
  80.  
  81.         RemoveLine(TL_Target_1, TXT_Target_1);
  82.         RemoveLine(TL_Target_2, TXT_Target_2);
  83.         RemoveLine(TL_Target_3, TXT_Target_3);
  84.         RemoveLine(TL_TargetATR,TXT_TargetATR);
  85.  
  86.     end;
  87. end;
  88. #endregion
  89.  
  90.  
  91.  
  92.  
  93. in the end:
  94.  
  95.  
  96.  
  97. //******************************
  98. #region Remove Entry Lines
  99.  
  100. if LE_Trigger = false then  begin
  101.     RemoveLine(TL_LEORB, TXT_LEORB);
  102.     RemoveLine(TL_LEPMBreak, TXT_LEPMBreak);
  103.     RemoveLine(TL_LECandle, TXT_LECandle);
  104.     RemoveLine(TL_LEHeikinAshi, TXT_LEHeikinAshi);
  105.     RemoveLine(TL_LEPivot1, TXT_LEPivot1);
  106.     RemoveLine(TL_LEPivot2, TXT_LEPivot2);
  107.     RemoveLine(TL_LEPivot3, TXT_LEPivot3);
  108.     RemoveLine(TL_LEATR, TXT_LEATR);
  109.     RemoveLine(TL_LEPar, TXT_LEPar);
  110. end;
  111.  
  112. if SE_Trigger = false then begin
  113.     RemoveLine(TL_SEORB, TXT_SEORB);
  114.     RemoveLine(TL_SEPMBreak, TXT_SEPMBreak);
  115.     RemoveLine(TL_SECandle, TXT_SECandle);
  116.     RemoveLine(TL_SEHeikinAshi, TXT_SEHeikinAshi);
  117.     RemoveLine(TL_SEPivot1, TXT_SEPivot1);
  118.     RemoveLine(TL_SEPivot2, TXT_SEPivot2);
  119.     RemoveLine(TL_SEPivot3, TXT_SEPivot3);
  120.     RemoveLine(TL_SEATR, TXT_SEATR);
  121.     RemoveLine(TL_SEPar, TXT_SEPar);
  122. end;
  123.  
  124. LE_Trigger = false;
  125. SE_Trigger = false;
  126.  
  127. #endregion
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top