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 hiachiever
Thanks for that - I added the
IndicatorBuffers(2); to the init section; it complied ok but nothing
Hi,
A little further review has uncovered your problem. What you have done is not add in correct referencing of your indicators, these should have the variable 'i' as a reference not a specific bar number.
EG.
This is incorrect.
double cci_1 = iCCI(Symbol(), Period(), CCI_Period, PRICE_TYPICAL, 1);
double cci_2 = iCCI(Symbol(), Period(), CCI_Period, PRICE_TYPICAL, 2);
It should be
double cci_1 = iCCI(Symbol(), Period(), CCI_Period, PRICE_TYPICAL, i+1);
double cci_2 = iCCI(Symbol(), Period(), CCI_Period, PRICE_TYPICAL, i+2);
Cheers,
Hiachiever
One obvious thing is that you are missing a declaration for the number of indicator buffers that you are going to use.
This sits in the first part of init
eg
int init()
{
IndicatorBuffers(2);
.....
}
Give it a go and see if it fixes your problem. Note I haven't fully checked the code, I simply checked for obvious errors.
Cheers,
Hiachiever.One obvious thing is that you are missing a declaration for the number of indicator buffers that you are going to use.
This sits in the first part of init
eg
int init()
{
IndicatorBuffers(2);
.....
}Hiachiever,
I think you dont need to repeat the number of buffers if it is the same as the one defined "#property indicator_buffers 2"
You are right if there's other temporary buffers. But not in that case.
FerruFx
Hiachiever,
I think you dont need to repeat the number of buffers if it is the same as the one defined "#property indicator_buffers 2"
You are right if there's other temporary buffers. But not in that case.
FerruFxThanks for the Tip FerruFX, always appreciated.
Cheers,
Hiachiever
Thanks for the Tip FerruFX, always appreciated.
You're welcome.
FerruFx
How to use CCI Woodies in EA
Hi Cracks
maybe somebody can help me.
The EA makes no trades with this settings
When i will use the indicator CCI_Woodies_Lnx_v4.mq4 in an EA then I use following code:
extern int TrendCCI_Period = 14;
extern int EntryCCI_Period = 6;
extern int LSMAPeriod = 25; // LSMA period
extern int Trend_period = 5;
extern int CountBars = 1000;
extern int CCISize = 2;
extern int TCCISize = 1;
extern int TrendSize = 1;
extern int NoTrendSize = 1;
extern bool ShowLSMA = false;
extern int LineSize3 = 1;
and definition for Indicator is:
double CCI_0 = iCustom(NULL,0,"CCI_Woodies_Lnx_v4",
TrendCCI_Period,EntryCCI_Period,LSMAPeriod,Trend_period,
CountBars,CCISize,TCCISize,TrendSize,NoTrendSize,ShowLSMA,LineSize3,0);
to many parameters for indicator?
No error by compiling
In the journal edit:
CCI_Woodies_Lnx_v4 USDJPY,M15: removed
See EA_Test_template
Hi Cracks maybe somebody can help me.
I see with your code the idea is to buy/sell above/below 0 line.
Why don't you try with iCCI for your TCCI instead of call iCustom. There is nothing different between standard CCI and the other indicator.
In your iCustom(); what is the LineSize3 parameter? If it's the CCI_Woodies_Lnx_v4 buffer number that's ok, if not, the buffer number you want to call is missing.
Also you have a space in your coding here: "S howLSMA".
FerruFx
Need help with this code, please.
Hi guys i have been trying for the last three days to get this expert advisor to execute long trades in mt4 with no success. it only executes short trades even though the signal_buy is there . please could anyone have a look at this code and fix it for me or tell me what to do. i'm new to programming and built it from an online strategy builder. thanks in advance!
the code is attached.