11//+------------------------------------------------------------------+
22//| Chart Pattern Helper |
3- //| Copyright © 2013-2022 , EarnForex.com |
3+ //| Copyright © 2013-2023 , EarnForex.com |
44//| https://www.earnforex.com/ |
55//+------------------------------------------------------------------+
6- #property copyright " Copyright © 2013-2022 , EarnForex"
6+ #property copyright " Copyright © 2013-2023 , EarnForex"
77#property link " https://www.earnforex.com/metatrader-expert-advisors/ChartPatternHelper/"
8- #property version " 1.11 "
8+ #property version " 1.12 "
99
1010#property description " Uses graphic objects (horizontal/trend lines, channels) to enter trades."
1111#property description " Works in two modes:"
@@ -767,7 +767,8 @@ void AdjustUpperAndLowerOrders()
767767 {
768768 if (ObjectFind (0 , LowerBorderLine ) >= 0 ) // Line.
769769 {
770- BorderLevel = NormalizeDouble (ObjectGetValueByTime (ChartID (), LowerBorderLine , Time [1 ]), _Digits );
770+ if (ObjectGetInteger (ChartID (), LowerBorderLine , OBJPROP_TYPE ) == OBJ_HLINE ) BorderLevel = NormalizeDouble (ObjectGetDouble (0 , LowerBorderLine , OBJPROP_PRICE , 0 ), _Digits );
771+ else BorderLevel = NormalizeDouble (ObjectGetValueByTime (ChartID (), LowerBorderLine , Time [1 ]), _Digits );
771772 }
772773 else // Channel
773774 {
@@ -786,7 +787,8 @@ void AdjustUpperAndLowerOrders()
786787 {
787788 if (ObjectFind (0 , UpperBorderLine ) >= 0 ) // Line.
788789 {
789- BorderLevel = NormalizeDouble (ObjectGetValueByTime (ChartID (), UpperBorderLine , Time [1 ]), _Digits );
790+ if (ObjectGetInteger (ChartID (), UpperBorderLine , OBJPROP_TYPE ) == OBJ_HLINE ) BorderLevel = NormalizeDouble (ObjectGetDouble (0 , UpperBorderLine , OBJPROP_PRICE , 0 ), _Digits );
791+ else BorderLevel = NormalizeDouble (ObjectGetValueByTime (ChartID (), UpperBorderLine , Time [1 ]), _Digits );
790792 }
791793 else // Channel
792794 {
0 commit comments