View Single Post
Old 2009-03-14, 02:30 PM   #6 (permalink)
IvoHR
Rookie Pip Officer
 
Posts: 16

Default

Yeah, a consolidating market is truly a problem for this indicator. But if you use multycurrencies, this would be ok than.

i'm using the NonLagMA. There is a section in the code, where the alert is printed, when to put a buy order. Exactly than when a new bar opens, and the trend chaned. It's programmed alil bit strange but its still ok.

i do open a new trade in the direction of the trend and closing the other trade at the same time.

I modified the indicator with these two lines:
(1 is for uptrend, und 2 for downtrend)
Using this global variable for my EA. Ill post the ea here when i finish it,
but at the moment i'm recieving some 4110error not knowing why.
just need to check it.

if ( trend[2]<0 && trend[1]>0 && Volume[0]>1 && !UpTrendAlert)
{
GlobalVariableSet("trend"+Symbol(),1);
Message = " NonLagMA "+Symbol()+" M"+Period()+": Signal for BUY";
if ( AlertMode>0 ) Alert (Message);
UpTrendAlert=true; DownTrendAlert=false;

}

if ( trend[2]>0 && trend[1]<0 && Volume[0]>1 && !DownTrendAlert)
{
GlobalVariableSet("trend"+Symbol(),2);
Message = " NonLagMA "+Symbol()+" M"+Period()+": Signal for SELL";
if ( AlertMode>0 ) Alert (Message);
DownTrendAlert=true; UpTrendAlert=false;

}
IvoHR is offline   Reply With Quote