ソースを参照

ticket # 1483

update high and low in new bos condition
AhtashamShahzad3 2 年 前
コミット
394b1c7694
共有2 個のファイルを変更した148 個の追加75 個の削除を含む
  1. BIN
      BOS_CHOCH.ex5
  2. 148 75
      BOS_CHOCH.mq5

BIN
BOS_CHOCH.ex5


+ 148 - 75
BOS_CHOCH.mq5

@@ -123,13 +123,13 @@ void Bos(int i)
123 123
 
124 124
          high_index = iBarShift(Symbol(), PERIOD_CURRENT, high_index_time, false);
125 125
 
126
-         Print("high index ",high_index);
126
+         //  Print("high index ",high_index);
127 127
 
128 128
          int count = (high_index-1) - i;
129 129
 
130 130
 
131 131
 
132
-         Print("count is ",count);
132
+         //  Print("count is ",count);
133 133
 
134 134
          for(int j=count; j >= 1; j--)
135 135
            {
@@ -143,7 +143,8 @@ void Bos(int i)
143 143
                  }
144 144
 
145 145
                high = high1;
146
-               Print(" high is updated : ",high);
146
+
147
+               // Print(" high is updated : ",high);
147 148
 
148 149
 
149 150
                ObjectCreate(0,"high",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,i),high,iTime(Symbol(),PERIOD_CURRENT,0),high);
@@ -159,13 +160,13 @@ void Bos(int i)
159 160
                Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
160 161
 
161 162
 
162
-               Print("last bos index is ",Store_bos_last_index);
163
+               //   Print("last bos index is ",Store_bos_last_index);
163 164
 
164 165
 
165
-               Print("bearish candle found and its low is ",low);
166
+               //    Print("bearish candle found and its low is ",low);
166 167
 
167 168
                low =  iLow(Symbol(),PERIOD_CURRENT,high_index-j);
168
-               Print("bearish candle found and its low is ",low);
169
+               //     Print("bearish candle found and its low is ",low);
169 170
                bearish_found = true;
170 171
                count = high_index-j;
171 172
                index_of_low_time = iTime(Symbol(),PERIOD_CURRENT,high_index-j);
@@ -189,7 +190,7 @@ void Bos(int i)
189 190
 
190 191
                   //index_of_low = high_index- k;
191 192
 
192
-                  Print("                                       ------------------index of low ",index_of_low);
193
+                  //     Print("                                       ------------------index of low ",index_of_low);
193 194
                   bearish_found = false;
194 195
 
195 196
 
@@ -225,8 +226,8 @@ void Bos(int i)
225 226
            }
226 227
 
227 228
 
228
-         Print("high of uptrend is ", high);
229
-         Print("low of uptrend is ", low);
229
+         // Print("high of uptrend is ", high);
230
+         //  Print("low of uptrend is ", low);
230 231
 
231 232
          high_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
232 233
 
@@ -273,11 +274,11 @@ void Bos(int i)
273 274
 
274 275
          low_index = iBarShift(Symbol(), PERIOD_CURRENT, low_index_time, false);
275 276
 
276
-         Print("low index ",low_index);
277
+         //  Print("low index ",low_index);
277 278
 
278 279
 
279 280
          int count = (low_index-1) - i;
280
-         Print("count is ",count);
281
+         //    Print("count is ",count);
281 282
 
282 283
          for(int j=count; j >= 1; j--)
283 284
            {
@@ -303,7 +304,7 @@ void Bos(int i)
303 304
 
304 305
 
305 306
                store_last_bos_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
306
-               Print(store_last_bos_index_time);
307
+               //         Print(store_last_bos_index_time);
307 308
 
308 309
                Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
309 310
 
@@ -313,14 +314,14 @@ void Bos(int i)
313 314
                //------
314 315
                low_index = iBarShift(Symbol(), PERIOD_CURRENT, low_index_time, false);
315 316
 
316
-               Print("low index ",low_index);
317
+               //       Print("low index ",low_index);
317 318
 
318 319
 
319 320
 
320
-               Print("bullish candle found and its high is ",high);
321
+               //       Print("bullish candle found and its high is ",high);
321 322
 
322 323
                high =  iHigh(Symbol(),PERIOD_CURRENT,low_index-j);
323
-               Print("bullish candle found and its high is ",high);
324
+               //         Print("bullish candle found and its high is ",high);
324 325
                bullish_found = true;
325 326
                count = low_index-j;
326 327
                index_of_high_time = iTime(Symbol(),PERIOD_CURRENT,low_index-j);
@@ -371,8 +372,8 @@ void Bos(int i)
371 372
 
372 373
 
373 374
 
374
-         Print("high is ", high);
375
-         Print("low is ", low);
375
+         //     Print("high is ", high);
376
+         //     Print("low is ", low);
376 377
          low_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
377 378
 
378 379
 
@@ -588,7 +589,7 @@ void choch(int i)
588 589
 
589 590
          Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
590 591
 
591
-         Print("last bos index is ",Store_bos_last_index);
592
+         // Print("last bos index is ",Store_bos_last_index);
592 593
 
593 594
          int diff1 = Store_bos_last_index - (i);
594 595
 
@@ -613,9 +614,9 @@ void choch(int i)
613 614
 
614 615
          //Entry_Action_1_up(Store_bos_last_index,i,di);
615 616
 
616
-         Print("low update due to choch : ", low);
617
+         //   Print("low update due to choch : ", low);
617 618
          trend = "downtrend";
618
-         Print("choch at uptrend index --- ", iTime(Symbol(),PERIOD_CURRENT,i));
619
+         //    Print("choch at uptrend index --- ", iTime(Symbol(),PERIOD_CURRENT,i));
619 620
          choch_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
620 621
         }
621 622
 
@@ -640,7 +641,7 @@ void choch(int i)
640 641
          ObjectSetInteger(0,"line7"+iTime(Symbol(),PERIOD_CURRENT,i),OBJPROP_COLOR,clrGreen);
641 642
 
642 643
          Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
643
-         Print("last bos index is ",Store_bos_last_index);
644
+         //    Print("last bos index is ",Store_bos_last_index);
644 645
 
645 646
          int diff = Store_bos_last_index - (i);
646 647
 
@@ -664,8 +665,8 @@ void choch(int i)
664 665
 
665 666
          trend = "uptrend";
666 667
 
667
-         Print("high is update due to choch : ", high);
668
-         Print("choch at downtrend index ---- ", iTime(Symbol(),PERIOD_CURRENT,i));
668
+         //    Print("high is update due to choch : ", high);
669
+         //   Print("choch at downtrend index ---- ", iTime(Symbol(),PERIOD_CURRENT,i));
669 670
          choch_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
670 671
 
671 672
         }
@@ -684,6 +685,12 @@ void bos2(int i)
684 685
    bool cnd;
685 686
    bool candle_bullish = false;
686 687
    bool candle_bearish = false;
688
+   double find_high = 0.0;
689
+   datetime find_high_time = 0.0;
690
+
691
+   double find_low = 0.0;
692
+   datetime find_low_time = 0.0;
693
+
687 694
    if(trend == "downtrend")
688 695
      {
689 696
 
@@ -711,9 +718,16 @@ void bos2(int i)
711 718
            }
712 719
          choch_index = iBarShift(Symbol(), PERIOD_CURRENT, choch_index_time, false);
713 720
 
714
-
721
+         find_high  = iHigh(Symbol(),PERIOD_CURRENT,choch_index);
715 722
          for(int j=choch_index; j>=i; j--)
716 723
            {
724
+            double find_high1 = iHigh(Symbol(),PERIOD_CURRENT,j);
725
+
726
+            if(find_high < find_high1)
727
+              {
728
+               find_high = find_high1;
729
+               find_high_time = iTime(Symbol(),PERIOD_CURRENT,j);
730
+              }
717 731
 
718 732
             if(iClose(Symbol(),PERIOD_CURRENT,j) < iClose(Symbol(),PERIOD_CURRENT,i) || iLow(Symbol(),PERIOD_CURRENT,j) < iLow(Symbol(),PERIOD_CURRENT,i))
719 733
               {
@@ -734,8 +748,17 @@ void bos2(int i)
734 748
               }
735 749
            }
736 750
          Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
751
+
752
+         find_high  = iHigh(Symbol(),PERIOD_CURRENT,Store_bos_last_index);
737 753
          for(int j=Store_bos_last_index; j>=i; j--)
738 754
            {
755
+            double find_high1 = iHigh(Symbol(),PERIOD_CURRENT,j);
756
+
757
+            if(find_high < find_high1)
758
+              {
759
+               find_high = find_high1;
760
+               find_high_time = iTime(Symbol(),PERIOD_CURRENT,j);
761
+              }
739 762
             if(iClose(Symbol(),PERIOD_CURRENT,j) < iClose(Symbol(),PERIOD_CURRENT,i) || iLow(Symbol(),PERIOD_CURRENT,j) < iLow(Symbol(),PERIOD_CURRENT,i))
740 763
               {
741 764
                cnd = false;
@@ -747,6 +770,20 @@ void bos2(int i)
747 770
       if(cnd == true && candle_bullish == true)
748 771
         {
749 772
 
773
+         Print("high is --------------",find_high);
774
+         Print("high time  is --------------",find_high_time);
775
+
776
+         if(object_find("high") > 0)
777
+           {
778
+            ObjectDelete(0,"high");
779
+
780
+           }
781
+         high = find_high;
782
+         index_of_high = iBarShift(Symbol(), PERIOD_CURRENT, find_high_time, false);
783
+         ObjectCreate(0,"high",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,index_of_high),high,iTime(Symbol(),PERIOD_CURRENT,0),high);
784
+         ObjectSetInteger(0,"high",OBJPROP_RAY_RIGHT,true);
785
+         ObjectSetInteger(0,"high",OBJPROP_COLOR,clrBlue);
786
+
750 787
          if(object_find("low") > 0)
751 788
            {
752 789
             ObjectDelete(0,"low");
@@ -761,23 +798,23 @@ void bos2(int i)
761 798
 
762 799
 
763 800
          ObjectCreate(0,"line2"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),low);
764
-         ObjectSetString(0,"line2"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"bos");
801
+         ObjectSetString(0,"line2"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"bos2");
765 802
 
766 803
 
767 804
          store_last_bos_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
768
-         Print(store_last_bos_index_time);
805
+         // Print(store_last_bos_index_time);
769 806
 
770 807
          Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
771 808
 
772 809
 
773
-         Print("last bos index is ",Store_bos_last_index);
810
+         //  Print("last bos index is ",Store_bos_last_index);
774 811
 
775
-         Print("low is ", low);
812
+         //   Print("low is ", low);
776 813
          low_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
777 814
 
778 815
          low_index = iBarShift(Symbol(), PERIOD_CURRENT, low_index_time, false);
779 816
 
780
-         Print("low index ",low_index);
817
+         //    Print("low index ",low_index);
781 818
          cnd = false;
782 819
          candle_bullish = false;
783 820
 
@@ -803,16 +840,27 @@ void bos2(int i)
803 840
 
804 841
       if(choch_index_time < store_last_bos_index_time)
805 842
         {
843
+
806 844
          for(int m=Store_bos_last_index; m>i; m--)
807 845
            {
808 846
             if(checkCandle(m) == "Bearish")
809 847
               {
810
-               Print("found bearish at index ",iTime(Symbol(),PERIOD_CURRENT,m));
848
+               //   Print("found bearish at index ",iTime(Symbol(),PERIOD_CURRENT,m));
811 849
                candle_bearish = true;
812 850
               }
813 851
            }
852
+         find_low  = iLow(Symbol(),PERIOD_CURRENT,Store_bos_last_index);
814 853
          for(int j=Store_bos_last_index; j>=i; j--)
815 854
            {
855
+
856
+            double find_low1 = iLow(Symbol(),PERIOD_CURRENT,j);
857
+
858
+            if(find_low > find_low1)
859
+              {
860
+               find_low = find_low1;
861
+               find_low_time = iTime(Symbol(),PERIOD_CURRENT,j);
862
+              }
863
+
816 864
             if(iClose(Symbol(),PERIOD_CURRENT,j) > iClose(Symbol(),PERIOD_CURRENT,i) || iHigh(Symbol(),PERIOD_CURRENT,j) > iHigh(Symbol(),PERIOD_CURRENT,i))
817 865
               {
818 866
                cnd = false;
@@ -827,12 +875,20 @@ void bos2(int i)
827 875
            {
828 876
             if(checkCandle(m) == "Bearish")
829 877
               {
830
-               Print("found bearish at index ",iTime(Symbol(),PERIOD_CURRENT,m));
878
+               //    Print("found bearish at index ",iTime(Symbol(),PERIOD_CURRENT,m));
831 879
                candle_bearish = true;
832 880
               }
833 881
            }
882
+         find_low  = iLow(Symbol(),PERIOD_CURRENT,choch_index);
834 883
          for(int j=choch_index; j>=i; j--)
835 884
            {
885
+            double find_low1 = iLow(Symbol(),PERIOD_CURRENT,j);
886
+
887
+            if(find_low > find_low1)
888
+              {
889
+               find_low = find_low1;
890
+               find_low_time = iTime(Symbol(),PERIOD_CURRENT,j);
891
+              }
836 892
 
837 893
             if(iClose(Symbol(),PERIOD_CURRENT,j) > iClose(Symbol(),PERIOD_CURRENT,i) || iHigh(Symbol(),PERIOD_CURRENT,j) > iHigh(Symbol(),PERIOD_CURRENT,i))
838 894
               {
@@ -848,6 +904,24 @@ void bos2(int i)
848 904
       if(cnd == true && candle_bearish == true)
849 905
         {
850 906
 
907
+         Print("low is --------------",find_low);
908
+         Print("low time  is --------------",find_low_time);
909
+
910
+         if(object_find("low") > 0)
911
+           {
912
+            ObjectDelete(0,"low");
913
+
914
+           }
915
+         low = find_low;
916
+         index_of_low = iBarShift(Symbol(), PERIOD_CURRENT, find_low_time, false);
917
+         ObjectCreate(0,"low",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,index_of_low),low,iTime(Symbol(),PERIOD_CURRENT,0),low);
918
+         ObjectSetInteger(0,"low",OBJPROP_RAY_RIGHT,true);
919
+         ObjectSetInteger(0,"low",OBJPROP_COLOR,clrRed);
920
+
921
+
922
+
923
+
924
+
851 925
          if(object_find("high") > 0)
852 926
            {
853 927
             ObjectDelete(0,"high");
@@ -855,7 +929,7 @@ void bos2(int i)
855 929
            }
856 930
 
857 931
          high = iHigh(Symbol(),PERIOD_CURRENT,i);
858
-         Print(" high is updated : ",high);
932
+         //  Print(" high is updated : ",high);
859 933
 
860 934
 
861 935
          ObjectCreate(0,"high",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,i),high,iTime(Symbol(),PERIOD_CURRENT,0),high);
@@ -863,7 +937,7 @@ void bos2(int i)
863 937
          ObjectSetInteger(0,"high",OBJPROP_COLOR,clrBlue);
864 938
 
865 939
          ObjectCreate(0,"line1"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),high);
866
-         ObjectSetString(0,"line1"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"bos");
940
+         ObjectSetString(0,"line1"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"bos2");
867 941
 
868 942
          store_last_bos_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
869 943
          Print(store_last_bos_index_time);
@@ -871,17 +945,17 @@ void bos2(int i)
871 945
          Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
872 946
 
873 947
 
874
-         Print("last bos index is ",Store_bos_last_index);
948
+         //  Print("last bos index is ",Store_bos_last_index);
875 949
 
876 950
 
877 951
 
878 952
 
879
-         Print("high is ", high);
953
+         //   Print("high is ", high);
880 954
          high_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
881 955
 
882 956
          high_index = iBarShift(Symbol(), PERIOD_CURRENT, high_index_time, false);
883 957
 
884
-         Print("low index ",high_index);
958
+         //   Print("low index ",high_index);
885 959
 
886 960
 
887 961
          cnd = false;
@@ -911,8 +985,8 @@ void third_Condition(int i)
911 985
       if(low2 < low)
912 986
         {
913 987
          third_condition_met = true;
914
-        // ObjectCreate(0,"line5"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iLow(Symbol(),PERIOD_CURRENT,i));
915
-       //  ObjectSetString(0,"line5"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
988
+         ObjectCreate(0,"line5"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iLow(Symbol(),PERIOD_CURRENT,i));
989
+         ObjectSetString(0,"line5"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
916 990
          low = low2;
917 991
 
918 992
          low_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
@@ -930,14 +1004,14 @@ void third_Condition(int i)
930 1004
 
931 1005
          ObjectSetInteger(0,"low",OBJPROP_COLOR,clrRed);
932 1006
 
933
-         Print("low update due to third condition",low," time of the candle is ",iTime(Symbol(),PERIOD_CURRENT,i));
1007
+         //   Print("low update due to third condition",low," time of the candle is ",iTime(Symbol(),PERIOD_CURRENT,i));
934 1008
         }
935 1009
 
936 1010
       if(high2 > high)
937 1011
         {
938 1012
          //third_condition_met = true;
939
-        // ObjectCreate(0,"line51"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iHigh(Symbol(),PERIOD_CURRENT,i));
940
-        // ObjectSetString(0,"line51"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
1013
+         ObjectCreate(0,"line51"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iHigh(Symbol(),PERIOD_CURRENT,i));
1014
+         ObjectSetString(0,"line51"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
941 1015
          high = high2;
942 1016
 
943 1017
          high_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
@@ -955,7 +1029,7 @@ void third_Condition(int i)
955 1029
 
956 1030
          ObjectSetInteger(0,"high",OBJPROP_COLOR,clrBlue);
957 1031
 
958
-         Print("high update due to third condition",high," time of the candle is ",iTime(Symbol(),PERIOD_CURRENT,i));
1032
+         //       Print("high update due to third condition",high," time of the candle is ",iTime(Symbol(),PERIOD_CURRENT,i));
959 1033
         }
960 1034
 
961 1035
 
@@ -969,8 +1043,8 @@ void third_Condition(int i)
969 1043
       if(high2 > high)
970 1044
         {
971 1045
          //third_condition_met = true;
972
-       //  ObjectCreate(0,"line6"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iHigh(Symbol(),PERIOD_CURRENT,i));
973
-       //  ObjectSetString(0,"line6"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
1046
+         ObjectCreate(0,"line6"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iHigh(Symbol(),PERIOD_CURRENT,i));
1047
+         ObjectSetString(0,"line6"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
974 1048
 
975 1049
          high = high2;
976 1050
 
@@ -986,14 +1060,14 @@ void third_Condition(int i)
986 1060
          ObjectCreate(0,"high",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,i),high,iTime(Symbol(),PERIOD_CURRENT,0),high);
987 1061
          ObjectSetInteger(0,"high",OBJPROP_RAY_RIGHT,true);
988 1062
          ObjectSetInteger(0,"high",OBJPROP_COLOR,clrBlue);
989
-         Print("high update due to third condition",high);
1063
+         //       Print("high update due to third condition",high);
990 1064
         }
991 1065
 
992 1066
       if(low2 < low)
993 1067
         {
994 1068
          third_condition_met = true;
995
-       //  ObjectCreate(0,"line61"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iLow(Symbol(),PERIOD_CURRENT,i));
996
-      //   ObjectSetString(0,"line61"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
1069
+         ObjectCreate(0,"line61"+iTime(Symbol(),PERIOD_CURRENT,i),OBJ_TEXT,0,iTime(Symbol(),PERIOD_CURRENT,i),iLow(Symbol(),PERIOD_CURRENT,i));
1070
+         ObjectSetString(0,"line61"+iTime(Symbol(),PERIOD_CURRENT,i), OBJPROP_TEXT,"3_C");
997 1071
 
998 1072
          low = low2;
999 1073
 
@@ -1006,11 +1080,11 @@ void third_Condition(int i)
1006 1080
             ObjectDelete(0,"low");
1007 1081
 
1008 1082
            }
1009
-         Print("low value is ", low);
1083
+         //      Print("low value is ", low);
1010 1084
          ObjectCreate(0,"low",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,i),low,iTime(Symbol(),PERIOD_CURRENT,0),low);
1011 1085
          ObjectSetInteger(0,"low",OBJPROP_RAY_RIGHT,true);
1012 1086
          ObjectSetInteger(0,"low",OBJPROP_COLOR,clrRed);
1013
-         Print("low update due to third condition",low);
1087
+         //   Print("low update due to third condition",low);
1014 1088
         }
1015 1089
      }
1016 1090
 
@@ -1212,7 +1286,7 @@ void foo1(int value)
1212 1286
 
1213 1287
       //Bos(i);
1214 1288
       //choch(i);
1215
-      third_Condition(i);
1289
+      //third_Condition(i);
1216 1290
 
1217 1291
 
1218 1292
       //      if(signal == "buy" || signal == "sell")
@@ -1356,27 +1430,26 @@ int OnInit()
1356 1430
 
1357 1431
 
1358 1432
    int idx = 0;
1359
-int user_input_index = iBarShift(Symbol(), PERIOD_CURRENT,inpTime, false);
1360
-if(ObjectCreate(0,"line",OBJ_VLINE,0,inpTime,iLow(Symbol(),PERIOD_CURRENT,user_input_index)))
1361
-  {
1362
-   Print("vertical line created on chart : ");
1363
-  }
1364
-else
1365
-  {
1366
-   Print("error in creating line : ");
1367
-  }
1368
-
1369
-
1370
-   //int user_input_index = iBarShift(Symbol(), PERIOD_CURRENT, D'2022.09.01 15:30:27', false);
1371
-   //if(ObjectCreate(0,"line",OBJ_VLINE,0,D'2022.09.01 15:30:27',iLow(Symbol(),PERIOD_CURRENT,user_input_index)))
1372
-   //  {
1373
-   //   Print("object created on chart : ");
1374
-   //  }
1375
-   //else
1376
-   //  {
1377
-   //   Print("object not created : ");
1378
-   //  }
1379
-     
1433
+//int user_input_index = iBarShift(Symbol(), PERIOD_CURRENT,inpTime, false);
1434
+//if(ObjectCreate(0,"line",OBJ_VLINE,0,inpTime,iLow(Symbol(),PERIOD_CURRENT,user_input_index)))
1435
+//  {
1436
+//   Print("vertical line created on chart : ");
1437
+//  }
1438
+//else
1439
+//  {
1440
+//   Print("error in creating line : ");
1441
+//  }
1442
+
1443
+
1444
+   int user_input_index = iBarShift(Symbol(), PERIOD_CURRENT, D'2022.09.01 15:30:27', false);
1445
+   if(ObjectCreate(0,"line",OBJ_VLINE,0,D'2022.09.01 15:30:27',iLow(Symbol(),PERIOD_CURRENT,user_input_index)))
1446
+     {
1447
+      Print("object created on chart : ");
1448
+     }
1449
+   else
1450
+     {
1451
+      Print("object not created : ");
1452
+     }
1380 1453
    object_find(object_name);
1381 1454
    if(object_find(object_name) == true)
1382 1455
      {
@@ -1386,7 +1459,7 @@ else
1386 1459
       //
1387 1460
       //      index = iBarShift(Symbol(), PERIOD_CURRENT, time_of_candle1, false);
1388 1461
 
1389
-      Print("candle is ",checkCandle(user_input_index));
1462
+      //  Print("candle is ",checkCandle(user_input_index));
1390 1463
 
1391 1464
       if(checkCandle(user_input_index) == "Bullish")
1392 1465
         {
@@ -1424,7 +1497,7 @@ else
1424 1497
            {
1425 1498
             if(checkCandle(j) == "Bullish")
1426 1499
               {
1427
-               Print("bullish found ",iTime(Symbol(),PERIOD_CURRENT,j));
1500
+               //     Print("bullish found ",iTime(Symbol(),PERIOD_CURRENT,j));
1428 1501
                high =  iHigh(Symbol(),PERIOD_CURRENT,j);
1429 1502
                idx = j;
1430 1503
                break;
@@ -1449,8 +1522,8 @@ else
1449 1522
       //high = iHigh(Symbol(),PERIOD_CURRENT,user_input_index);
1450 1523
       //low = iLow(Symbol(),PERIOD_CURRENT,user_input_index);
1451 1524
 
1452
-      Print(high);
1453
-      Print(low);
1525
+      //  Print(high);
1526
+      //   Print(low);
1454 1527
       //high_index = user_input_index;
1455 1528
       //low_index = user_input_index;
1456 1529