Tradingkevin
asked this on February 05, 2012 18:55
Hi guys ,
I was wondering if somebody could convert this indicator code into Market Delta RTL coding. I believe it's coding for Investor RT at to start with. I have got this code from bigmiketrading. It works in Investor rt . I have attached a file of what it looks like . Thanks Kevin
//******************************************************//
// MacdBB 12/24/07 //
//******************************************************//
//
// for "Chart_Offset" I use .0005 for EC and other 4 dec symbols.
// I use .5 for the ER2 and 1.00 for the ES, equities - expirament.
//
// Imagine this will work on Radar Screen, haven't tried it. I
// would just use the "Plot_Chart" setting and see what happens.
//
inputs:
Price(Close),
FastLen( 12 ),
SlowLen( 26 ),
Length ( 10 ),
StDv( 1 ),
BB_Color_Up(Green),
BB_Color_Dn(Red),
Upper_Band_Color(Red),
Lower_Band_Color(Blue),
Zero_Color_Up(Blue),
Zero_Color_Dn(Red);
VARS:
BB_Macd(0),
Avg(0),
SDev(0),
Upper_Band(0),
Lower_Band(0),
BB_Color(Black), {black is meaningless - just for initialize}
Cross_Up(False),
Cross_Dn(False),
Zero_Color(yellow); {yellow is meaningless - just for initialize}
//******************************************************//
// Main Calculations. //
//******************************************************//
BB_Macd = MACD( Price, FastLen, SlowLen ) * 100 ;
Avg = XAverage( BB_Macd, Length);
SDev = StandardDev( BB_Macd, Length, 1);
Upper_Band = ( Avg + StDv * SDev );
Lower_Band = ( Avg - StDv * SDev );
//******************************************************//
// Sub-Graph plot logic. //
//******************************************************//
If BB_Macd > BB_Macd[1] then BB_Color = BB_Color_Up else BB_Color = BB_Color_Dn;
If Cross_Up = False then if BB_Macd > Upper_Band then begin
Cross_Up = True;
Cross_Dn = False;
BB_Color = Cyan;
end;
If Cross_Dn = False then if BB_Macd < Lower_Band then begin
Cross_Up = False;
Cross_Dn = True;
BB_Color = Yellow;
end;
If ( BB_Macd < 0 ) then Zero_Color = Zero_Color_Dn else if
( BB_Macd > 0 ) then Zero_Color = Zero_Color_Up;
Plot1( BB_Macd, "MACD Dots" ,BB_Color );
Plot2( Upper_Band, "Upper_Band", Upper_Band_Color );
Plot3( Lower_Band, "Lower_Band", Lower_Band_Color );
Plot4( 0, "Zero_Line", Zero_Color );
Comments
Hi - I responded to your email regarding this indicator.
This indicator is not in Investor RT format. It looks like TradeStation. You cannot "convert" it, you should simply recode it as RTL. Generally, making an indicator in RTL requires quite a lot less work as it is designed to be at about the same level of complexity as writing simple formulas in MIcrosoft Excel.
Also, I am changing this to be in the RTL forum.