Skip to content

Commit

Permalink
change all indicator value to shift(a external parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tony,tong committed Jan 16, 2018
1 parent 0f75a87 commit 1311082
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ThreeScreen/IchmokuHAGoldH4.mq4
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ if (Bars != ThisBarTrade ) {// To avoid more order in one bar!
//double PDIP=iCustom(Symbol(),High_TF,"ADX+ADXMA",adx_ln,adxma_ln,adxma_type,2,1);
//double PDIM=iCustom(Symbol(),High_TF,"ADX+ADXMA",adx_ln,adxma_ln,adxma_type,3,1);

double IchomuA = iIchimoku(NULL, High_TF , 12 , 29 , 52 , 3 , 0);
double IchomuB = iIchimoku(NULL, High_TF , 12 , 29 , 52 , 4 , 0);
double IchomuA = iIchimoku(NULL, High_TF , 12 , 29 , 52 , 3 , shift);
double IchomuB = iIchimoku(NULL, High_TF , 12 , 29 , 52 , 4 , shift);

int ichomuTrend = 0;
if(Close[shift] > IchomuA && Close[shift] > IchomuB){
Expand All @@ -255,10 +255,10 @@ if (Bars != ThisBarTrade ) {// To avoid more order in one bar!

//Lower TF ichimoku
int ichomuTrendLowTF = 0;
double IchomuC = iIchimoku(NULL, Low_TF , 12 , 29 , 52 , 3 , 0);
double IchomuD = iIchimoku(NULL, Low_TF , 12 , 29 , 52 , 4 , 0);
double IchomuC = iIchimoku(NULL, Low_TF , 12 , 29 , 52 , 3 , shift);
double IchomuD = iIchimoku(NULL, Low_TF , 12 , 29 , 52 , 4 , shift);
// HA close value
double haClose = iCustom(NULL, Low_TF, "Heiken Ashi", 0,0,0,0, 3, 1);
double haClose = iCustom(NULL, Low_TF, "Heiken Ashi", 0,0,0,0, 3, shift);

if(haClose > IchomuC && haClose > IchomuD){
ichomuTrendLowTF = 1;
Expand All @@ -270,8 +270,8 @@ if (Bars != ThisBarTrade ) {// To avoid more order in one bar!

// Two MA channels
int maChannelCross = 0;
double maHigh = iMA( NULL, Low_TF, MaPeriod, MaShift, MaMode, PRICE_HIGH, 1);
double maLow = iMA( NULL, Low_TF, MaPeriod, MaShift, MaMode, PRICE_LOW, 1);
double maHigh = iMA( NULL, Low_TF, MaPeriod, MaShift, MaMode, PRICE_HIGH, shift);
double maLow = iMA( NULL, Low_TF, MaPeriod, MaShift, MaMode, PRICE_LOW, shift);
if(haClose > maHigh) maChannelCross = 1;
if(haClose < maLow) maChannelCross = -1;

Expand Down Expand Up @@ -434,7 +434,7 @@ if (Bars != ThisBarTrade ) {// To avoid more order in one bar!
}

int getPreviousSignalBarShift(int direction){
for(int i=0;i<20;i++){
for(int i=shift;i<20;i++){
double IchomuC = iIchimoku(NULL, Low_TF , 12 , 29 , 52 , 3 , i);
double IchomuD = iIchimoku(NULL, Low_TF , 12 , 29 , 52 , 4 , i);
// HA close value
Expand Down

0 comments on commit 1311082

Please sign in to comment.