Breakout box indicator - Help

Post Reply
User avatar
PIPone
Trader
Posts: 22
Joined: Fri Jun 28, 2013 4:58 pm

Breakout box indicator - Help

Post by PIPone »

I found this indicator that seems quite useful to identify flat periods before volatility breakouts.
The indicator has 2 buffers (value of Up line of box ; value of Low line of box) so it should be possible to use it into an expert.
I tried to extract the values of the two buffers by the ICustom call , but I get only number 2147483647 during backtesting .
It seems quite strange since in the data windows the values are displayed correctly (see screenshots).

I used the following code to extract the buffers:

External variables of EA:

extern int ROCPeriod = 2;
extern double BoxThreshold = 5.0;
extern int BoxMinBars = 3;
extern color BoxColor = DeepSkyBlue;
extern bool BoxBackground = TRUE;
extern int BoxLineWidth = 1;
extern int BoxBegin = 500;

double Box_UpperLine_Buffer0_Bar0 = iCustom(NULL, 0, "FlexBox_Indicator(mod)", ROCPeriod,BoxThreshold,BoxMinBars,BoxColor,BoxBackground,BoxLineWidth,BoxBegin, 0, 0);

double Box_LowerLine_Buffer1_Bar0 = iCustom(NULL, 0, "FlexBox_Indicator(mod)", ROCPeriod,BoxThreshold,BoxMinBars,BoxColor,BoxBackground,BoxLineWidth,BoxBegin, 1, 0);

Where am I wrong with my coding?
You do not have the required permissions to view the files attached to this post.
dietcoke
Trader
Posts: 162
Joined: Tue Nov 15, 2011 9:59 pm

Re: Breakout box indicator - Help

Post by dietcoke »

PIPone wrote:I found this indicator that seems quite useful to identify flat periods before volatility breakouts.
The indicator has 2 buffers (value of Up line of box ; value of Low line of box) so it should be possible to use it into an expert.
I tried to extract the values of the two buffers by the ICustom call , but I get only number 2147483647 during backtesting .
It seems quite strange since in the data windows the values are displayed correctly (see screenshots).

I used the following code to extract the buffers:

External variables of EA:

extern int ROCPeriod = 2;
extern double BoxThreshold = 5.0;
extern int BoxMinBars = 3;
extern color BoxColor = DeepSkyBlue;
extern bool BoxBackground = TRUE;
extern int BoxLineWidth = 1;
extern int BoxBegin = 500;

double Box_UpperLine_Buffer0_Bar0 = iCustom(NULL, 0, "FlexBox_Indicator(mod)", ROCPeriod,BoxThreshold,BoxMinBars,BoxColor,BoxBackground,BoxLineWidth,BoxBegin, 0, 0);

double Box_LowerLine_Buffer1_Bar0 = iCustom(NULL, 0, "FlexBox_Indicator(mod)", ROCPeriod,BoxThreshold,BoxMinBars,BoxColor,BoxBackground,BoxLineWidth,BoxBegin, 1, 0);

Where am I wrong with my coding?

Your code is fine. the "problem" may be that the indicator attached has a different value for this EA setting

extern double BoxThreshold = 5.0;
Image
User avatar
PIPone
Trader
Posts: 22
Joined: Fri Jun 28, 2013 4:58 pm

Re: Breakout box indicator - Help

Post by PIPone »

Your code is fine. the "problem" may be that the indicator attached has a different value for this EA setting

extern double BoxThreshold = 5.0;[/quote]


hi dietcoke, as you suggested I tried to change the value of BoxThreshold = 12.0 accordingly to the original setting of the indicator, but the output of EA variables still remain 2147483647 .
Maybe a bug of the indicator?
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: Breakout box indicator - Help

Post by milanese »

Hi,

have you tried it to resolve in the way fxdaytrader has helped out you with a similarly problem?
http://www.stevehopwoodforex.com/phpBB3 ... =27&t=3133

Cheers :)
Tommaso
User avatar
PIPone
Trader
Posts: 22
Joined: Fri Jun 28, 2013 4:58 pm

Re: Breakout box indicator - Help

Post by PIPone »

milanese wrote:Hi,

have you tried it to resolve in the way fxdaytrader has helped out you with a similarly problem?
http://www.stevehopwoodforex.com/phpBB3 ... =27&t=3133

Cheers :)
Tommaso

Hi Tommaso, when I call the ICustom function into an indicator the output of buffers values seem correct.
I use the template coded by fxdaytrader in the other thread and it works fine (see attach).
The problem still remains when I import the buffer into an Expert ! In this case I can't get any reasonable output .... :shock:
However, if you or somebody else is interested to implement the indicator into a breakout expert I am available to collaborate and publish it "open source " on this forum.

:D
cheeers
Massimo
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Indicators”