Codeme:
Please edit your post . . . .Hi,
I am trying to code my EA to check if my signal has already appeared in current trend so that I don't enter a trade if its not the first signal in the trend from a custom indicator ""BullPips_CCI"'". Any ideas how I could do this?
Trade Entry Part of my Code:
<SNIP>
Before posting please read some of the other threads . . . then you would have seen numerous requests like this one:
Please use this to post code . . . it makes it easier to read.You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I am trying to code my EA to check if my signal has already appeared in current trend so that I don't enter a trade if its not the first signal in the trend from a custom indicator ""BullPips_CCI"'". Any ideas how I could do this?
Trade Entry Part of my Code:
double BullPips1 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,34,57,88,false,0,1);
double BullPips2 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,33,57,88,false,1,1); // BUY
double BullPips3 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,33,57,88,false,2,1);
double BullPips4 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,33,57,88,false,3,1); // BUY
double BullPips5 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,33,57,88,false,4,1);
double BullPips6 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,33,57,88,false,5,1); // BUY
double BullPips7 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,33,57,88,false,6,1);
double BullPips8 = iCustom(NULL,0,"BullPips_CCI",1,PERIOD_M15,PERIOD_M15,PERIOD_M15,PERIOD_M15,13,33,57,88,false,7,1); // BUY
double ADX = iADX(NULL,0,ADX_Period,PRICE_CLOSE,0,1);
double RF = iCustom(NULL,0,"Retracement_Finder",4.0,1000,false,false,2,1);
if(ADX < ADX_trend_level && UseADXFilter){Ranging=true;}
int B1=0,B2=0,B3=0,B4=0,BTotal=0;bool IsBBP=false;
int S1=0,S2=0,S3=0,S4=0,STotal=0;bool IsSBP=false;
if(BullPips2 == 4){B1 = 1;}
if(BullPips4 == 3){B2 = 1;}
if(BullPips6 == 2){B3 = 1;}
if(BullPips8 == 1){B4 = 1;}
if(BullPips1 == 4){S1 = 1;}
if(BullPips3 == 3){S2 = 1;}
if(BullPips5 == 2){S3 = 1;}
if(BullPips7 == 1){S4 = 1;}
BTotal = B1 + B2 + B3 + B4;
STotal = S1 + S2 + S3 + S4;
if(TradeEntry){
if(IsBBP && RF > 0 && RF != EMPTY_VALUE && Close[1] > EMA55 && Close[1] > EMA34
&& MathAbs(EMA34 - EMA55) >= (MA_To_Price_Distance*Point*PF)){IsBUY = true;}
if(IsSBP && RF < 0 && RF != EMPTY_VALUE && Close[1] < EMA55 && Close[1] < EMA34
&& MathAbs(EMA34 - EMA55) >= (MA_To_Price_Distance*Point*PF)){IsSELL = true;}}//BullPips1 == 4 &&