Indicators with alerts/signal - page 993

takbir
180
takbir  
mrtools:
Samuelkanu, had an Rsi think it replaced the one you posted, and did the cci arrows too.

Hi, mrtools,

Thank you for your indicator.

When i try this indicator into EA, it gives an error like below.

if (alertsOn)

{

if (alertsOnCurrent)

int whichBar = 0;

else whichBar = 1; 'whichBar' - undeclared identifier

if (trend [whichBar]! = trend [whichBar + 1]) 'whichBar' - undeclared identifier

if (trend [whichBar] == 1)

doAlert ("Buy");

else doAlert ("Sell");

}

takbir
180
takbir  
takbir:
Hi, mrtools,

Thank you for your indicator.

When i try this indicator into EA, it gives an error like below.

if (alertsOn)

{

if (alertsOnCurrent)

int whichBar = 0;

else whichBar = 1; 'whichBar' - undeclared identifier

if (trend [whichBar]! = trend [whichBar + 1]) 'whichBar' - undeclared identifier

if (trend [whichBar] == 1)

doAlert ("Buy");

else doAlert ("Sell");

}

When i change the code into like below, everything is ok. But then the arrows are gone. How can i fix that? Any help will be greatly appreciated.

if (alertsOn)

{

int whichBar = 0 ;

if (alertsOnCurrent)

whichBar = 0 ;

else whichBar = 1 ;

if (Trend [whichBar]! = Trend [whichBar + 1 ])

if (Trend [whichBar] == 1 )

doAlert ( "Uptrend" );

else doAlert ( "downtrend" );

}

Mladen Rakic
153866
Mladen Rakic  
takbir:
When i change the code into like below, everything is ok. But then the arrows are gone. How can i fix that? Any help will be greatly appreciated.

if (alertsOn)

{

int whichBar = 0 ;

if (alertsOnCurrent)

whichBar = 0 ;

else whichBar = 1 ;

if (Trend [whichBar]! = Trend [whichBar + 1 ])

if (Trend [whichBar] == 1 )

doAlert ( "Uptrend" );

else doAlert ( "downtrend" );

}

That happens when you use strict property in the code. then you have to rewrite the rest of the code too

del10
44
del10  

Please add arrows when red fsp_short_trendv_1.2.mq4blue line and add

alerts

Mladen Rakic
153866
Mladen Rakic  
Alibydubby:
Please put arrows on Stochastic Stochastic when coming out of level 20 up arrow from level 80 down arrow Gyazo - 459b63f841027ddf11c46c8f4c34face.png

Alibydubby

There are already stochastic indicators that can do that at this same thread

takbir
180
takbir  
mladen:
That happens when you use strict property in the code. then you have to rewrite the rest of the code too

Thank you for your response Mr.Mladen,

Do you have any idea how to rewrite or get rid of that problem?

Mladen Rakic
153866
Mladen Rakic  
takbir:
Thank you for your response Mr.Mladen, Do you have any idea how to rewrite or get rid of that problem?

Simply remove #property strict line from the code, otherwise check the experts tab and it will write you out there in what line it has an "error" preventing it from working as before

takbir
180
takbir  

Thanks Mr. Mladen,

I prefer property strict and need help to write the alert line..

Mladen Rakic
153866
Mladen Rakic  
takbir:
Thanks Mr. Mladen, I prefer property strict and need help to write the alert line..

The indicator you are using as an example is working perfectly well without the strict property (even when called from an EA). So, why something that works perfectly well should be changed when no benefit of that change whatsoever would result ?

takbir
180
takbir  

Thank you, Mr.Mladen for feedback.