MA multimeter
Posted: Sun Jun 06, 2010 12:52 pm
Learning to Code from TRO. That's what I think when I play with his cool indicators.
I could not find a TRO version, but I probably just missed it. So I took a public released TRO multi-meter that did keyreversal and changed it to be moving averages.
You can of course change the type of MA and the time frame
If you have the donationals, you can mod a dashboard as follows (I can't post the Dashbaord since it is donatonal):
EXTERNALS at the top:
extern string notetype = "0=SMA,1=EMA,2=SMMA,3=LWMA" ;
extern int MAType = 1;
extern int maPeriod = 17;
Then mod the subroutine:
void DoWork( string myPair, int TimeFrame )
{
// Define the variables That are unique to this test
double MA0,MA1;
MA0 = iMA(myPair, TimeFrame,maPeriod,0,MAType,PRICE_CLOSE,0) ;
MA1 = iMA(myPair, TimeFrame,maPeriod,0,MAType,PRICE_CLOSE,1) ;
Bull = MA0 > MA1;
Bear = MA0 < MA1;
if ( Bull ) {thevalue = ArrowHeadUp ; theColor = UpColor ; } else
if ( Bear ) {thevalue = ArrowHeadDn ; theColor = DnColor ; }
else {thevalue = ArrowHeadRt ; theColor = NoSignalColor ; }
}
I could not find a TRO version, but I probably just missed it. So I took a public released TRO multi-meter that did keyreversal and changed it to be moving averages.
You can of course change the type of MA and the time frame
If you have the donationals, you can mod a dashboard as follows (I can't post the Dashbaord since it is donatonal):
EXTERNALS at the top:
extern string notetype = "0=SMA,1=EMA,2=SMMA,3=LWMA" ;
extern int MAType = 1;
extern int maPeriod = 17;
Then mod the subroutine:
void DoWork( string myPair, int TimeFrame )
{
// Define the variables That are unique to this test
double MA0,MA1;
MA0 = iMA(myPair, TimeFrame,maPeriod,0,MAType,PRICE_CLOSE,0) ;
MA1 = iMA(myPair, TimeFrame,maPeriod,0,MAType,PRICE_CLOSE,1) ;
Bull = MA0 > MA1;
Bear = MA0 < MA1;
if ( Bull ) {thevalue = ArrowHeadUp ; theColor = UpColor ; } else
if ( Bear ) {thevalue = ArrowHeadDn ; theColor = DnColor ; }
else {thevalue = ArrowHeadRt ; theColor = NoSignalColor ; }
}