Thank you for your indicator.
When i try this indicator into EA, it gives an error like below.
int whichBar = 0;
else whichBar = 1; 'whichBar' - undeclared identifier
if (trend [whichBar]! = trend [whichBar + 1]) 'whichBar' - undeclared identifier
if (trend [whichBar] == 1)
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.
int whichBar = 0 ;
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
Please add arrows when red fsp_short_trendv_1.2.mq4blue line and add
There are already stochastic indicators that can do that at this same thread
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
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 ?
Thank you, Mr.Mladen for feedback.