|
@@ -63,7 +63,10 @@ input datetime inpTime = 0;//First Line Draw t
|
|
|
sinput string str2 = "<><><><><><> General Settings <><><><><><>";
|
|
sinput string str2 = "<><><><><><> General Settings <><><><><><>";
|
|
|
input int magic_no = 123; // Magic no
|
|
input int magic_no = 123; // Magic no
|
|
|
input double lot_size = 0.1;
|
|
input double lot_size = 0.1;
|
|
|
-input lotcalculator lot_calculator = fix; //Lot Size Calculator
|
|
|
|
|
|
|
+input lotcalculator lot_calculator = fix; //Lot Size Calculator
|
|
|
|
|
+input bool Entry_condition_two_Enable = false; // Enable A1 Entry
|
|
|
|
|
+input bool Entry_condition_one_Enable = false; // Enable A2 Entry
|
|
|
|
|
+
|
|
|
|
|
|
|
|
input double risk = 1; //Risk in Percentage %
|
|
input double risk = 1; //Risk in Percentage %
|
|
|
input double stoploss = 20; // Stoploss Pips buffer from choch candle
|
|
input double stoploss = 20; // Stoploss Pips buffer from choch candle
|
|
@@ -773,8 +776,10 @@ void choch(int i)
|
|
|
int diff1 = Store_bos_last_index - (i);
|
|
int diff1 = Store_bos_last_index - (i);
|
|
|
|
|
|
|
|
// condition on 1st candle
|
|
// condition on 1st candle
|
|
|
-
|
|
|
|
|
- Entry_Action_1_up(Store_bos_last_index,i,diff1);
|
|
|
|
|
|
|
+ if(Entry_condition_one_Enable)
|
|
|
|
|
+ {
|
|
|
|
|
+ Entry_Action_1_up(Store_bos_last_index,i,diff1);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
low = iLow(Symbol(),PERIOD_CURRENT,i);
|
|
low = iLow(Symbol(),PERIOD_CURRENT,i);
|
|
@@ -876,8 +881,10 @@ void choch(int i)
|
|
|
signal = "";
|
|
signal = "";
|
|
|
|
|
|
|
|
// condition on 2st candle
|
|
// condition on 2st candle
|
|
|
-
|
|
|
|
|
- Entry_Action_2_up(Store_bos_last_index,i,diff1);
|
|
|
|
|
|
|
+ if(Entry_condition_two_Enable)
|
|
|
|
|
+ {
|
|
|
|
|
+ Entry_Action_2_up(Store_bos_last_index,i,diff1);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
low = iLow(Symbol(),PERIOD_CURRENT,i);
|
|
low = iLow(Symbol(),PERIOD_CURRENT,i);
|
|
|
|
|
|
|
@@ -929,8 +936,10 @@ void choch(int i)
|
|
|
|
|
|
|
|
Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
|
int diff = Store_bos_last_index - (i);
|
|
int diff = Store_bos_last_index - (i);
|
|
|
-
|
|
|
|
|
- Entry_Action_1_down(Store_bos_last_index,i,diff);
|
|
|
|
|
|
|
+ if(Entry_condition_one_Enable)
|
|
|
|
|
+ {
|
|
|
|
|
+ Entry_Action_1_down(Store_bos_last_index,i,diff);
|
|
|
|
|
+ }
|
|
|
high = iHigh(Symbol(),PERIOD_CURRENT,i);
|
|
high = iHigh(Symbol(),PERIOD_CURRENT,i);
|
|
|
|
|
|
|
|
high_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
|
|
high_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
|
|
@@ -1030,8 +1039,10 @@ void choch(int i)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
signal = "";
|
|
signal = "";
|
|
|
-
|
|
|
|
|
- Entry_Action_2_down(Store_bos_last_index,i,diff);
|
|
|
|
|
|
|
+ if(Entry_condition_two_Enable)
|
|
|
|
|
+ {
|
|
|
|
|
+ Entry_Action_2_down(Store_bos_last_index,i,diff);
|
|
|
|
|
+ }
|
|
|
high = iHigh(Symbol(),PERIOD_CURRENT,i);
|
|
high = iHigh(Symbol(),PERIOD_CURRENT,i);
|
|
|
|
|
|
|
|
high_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
|
|
high_index_time = iTime(Symbol(),PERIOD_CURRENT,i);
|
|
@@ -1115,7 +1126,7 @@ void bos2(int i)
|
|
|
for(int m=save_bullish_index; m>i; m--)
|
|
for(int m=save_bullish_index; m>i; m--)
|
|
|
{
|
|
{
|
|
|
double find_high1 = iHigh(Symbol(),PERIOD_CURRENT,m);
|
|
double find_high1 = iHigh(Symbol(),PERIOD_CURRENT,m);
|
|
|
- // find_high_time = iTime(Symbol(),PERIOD_CURRENT,m);
|
|
|
|
|
|
|
+ // find_high_time = iTime(Symbol(),PERIOD_CURRENT,m);
|
|
|
if(find_high < find_high1)
|
|
if(find_high < find_high1)
|
|
|
{
|
|
{
|
|
|
find_high = find_high1;
|
|
find_high = find_high1;
|
|
@@ -1156,7 +1167,7 @@ void bos2(int i)
|
|
|
for(int m=save_bullish_index; m>i; m--)
|
|
for(int m=save_bullish_index; m>i; m--)
|
|
|
{
|
|
{
|
|
|
double find_high1 = iHigh(Symbol(),PERIOD_CURRENT,m);
|
|
double find_high1 = iHigh(Symbol(),PERIOD_CURRENT,m);
|
|
|
- // find_high_time = iTime(Symbol(),PERIOD_CURRENT,m);
|
|
|
|
|
|
|
+ // find_high_time = iTime(Symbol(),PERIOD_CURRENT,m);
|
|
|
if(find_high < find_high1)
|
|
if(find_high < find_high1)
|
|
|
{
|
|
{
|
|
|
find_high = find_high1;
|
|
find_high = find_high1;
|
|
@@ -1315,7 +1326,7 @@ void bos2(int i)
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
low = find_low;
|
|
low = find_low;
|
|
|
- low_index_time = find_low_time; // here is the addition
|
|
|
|
|
|
|
+ low_index_time = find_low_time; // here is the addition
|
|
|
index_of_low = iBarShift(Symbol(), PERIOD_CURRENT, find_low_time, false);
|
|
index_of_low = iBarShift(Symbol(), PERIOD_CURRENT, find_low_time, false);
|
|
|
ObjectCreate(0,"low",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,index_of_low),low,iTime(Symbol(),PERIOD_CURRENT,0),low);
|
|
ObjectCreate(0,"low",OBJ_TREND,0,iTime(Symbol(),PERIOD_CURRENT,index_of_low),low,iTime(Symbol(),PERIOD_CURRENT,0),low);
|
|
|
ObjectSetInteger(0,"low",OBJPROP_RAY_RIGHT,true);
|
|
ObjectSetInteger(0,"low",OBJPROP_RAY_RIGHT,true);
|
|
@@ -2119,3 +2130,5 @@ string checkCandle(int v) // to check the candle is bullish or bearish
|
|
|
//+------------------------------------------------------------------+
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
+
|
|
|
|
|
+//+------------------------------------------------------------------+
|