Hi Everyone,
I want to create a compound variable for my program so that in the code, I can call its value instead of write that long code for it again.
Previously, I wrote that upbar and body variable and put it below the buffer section. It works.
later all i need is call upbar(i)
This time, I make it 1 more step further as below where I try to find which bar ADX move at least 20 point.
The error notice is:'}' - not all control paths return a value
Could you please help me with a proper way to create such variable?
Thank you,
SCFX
iAdx () reports the pointer to the indicator data. Not provide data directly.
int handleADX= 0; //global vars //... void OnInit() { //... handleADX= iADX(symbol, periodTF, adx_period); //... } void OnTick() { //... double bufferDats[]; int nCopy= CopyBuffer( handleADX, bufferNum, startPos, quantity, bufferDats); bool correct= nCopy==quantity; //... }
The Indicator datas are now on bufferDats[]
iAdx () reports the pointer to the indicator data. Not provide data directly.
The Indicator datas are now on bufferDats[]
Hi Everyone,
I want to create a compound variable for my program so that in the code, I can call its value instead of write that long code for it again.
Previously, I wrote that upbar and body variable and put it below the buffer section. It works.
later all i need is call upbar(i)
This time, I make it 1 more step further as below where I try to find which bar ADX move at least 20 point.
The error notice is:'}' - not all control paths return a value
Could you please help me with a proper way to create such variable?
Thank you,
SCFX
Remove the "else" line.
Yes, Thanks.
SCFX
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Everyone,
I want to create a compound variable for my program so that in the code, I can call its value instead of write that long code for it again.
Previously, I wrote that upbar and body variable and put it below the buffer section. It works.
later all i need is call upbar(i)
This time, I make it 1 more step further as below where I try to find which bar ADX move at least 20 point.
The error notice is:'}' - not all control paths return a value
Could you please help me with a proper way to create such variable?
Thank you,
SCFX