Convert profit trader indicator for me...

 

Hi, can anyone convert this TS code from profit trader into MQL? It's the "B Line" for buy/sell signals.. ideally if it could be plotted as buy/sell arrows on the charts, that would be excellent.

Here's the indicator...

{Description of Inputs}{CXOver - This oscillator can be used with a crossover, although it is usually plotted without one.CXOver is the length of the of the moving agerage of the BLine to construct the crossover. The purpose of a crossover is to improve the accuracy of an oscillator that wiggles at tops and bottoms. In most markets the BLine does not often wiggle at tops and bottoms.}

{SellLine and BuyLine are levels the osc must rise above for an osc downturn to paint a sell setup bar, or drop below for an osc upturn to paint a buy setup bar}

Inputs: CXOver(0),SellLine(70),BuyLine(30),Alrt(0);

Vars: Len1(3),Len2(3),Len3(3),OBOSMY(0),OBOSMYC(0),Sum(0),Cnt(0);

{OBOS}

Sum=0;

For Cnt=0 to Len2-1 begin

Sum=Sum+_OBOS(CXOver)[Cnt];

End;

If Len2>0 then

OBOSMY=Sum/Len2

Else

OBOSMY=0;

Sum=0;

For Cnt=0 to CXOver-1 begin

Sum=Sum+OBOSMY[Cnt];

End;

If CXOver>0 then

OBOSMYC=Sum/CXOver

Else

OBOSMYC=0;

If Alrt0 then begin

If OBOSMY<BuyLine then Alert=True;

If OBOSMY>SellLine then Alert=True;

End;

{Plots}

If CXOver=0 then

Plot1(Round(OBOSMY,1),"BLine");

If CXOver0 then begin

Plot1(Round(OBOSMY,1),"BLine");

Plot2(Round(OBOSMYC,1),"BLine_CO");

End;

Plot3(SellLine,"BLine_SL");

Plot4(BuyLine,"BLine_BL");

[/code]

and here is the OBOS function...

[code]

{_OBOS:OBOB}

Inputs: CXOver(NumericSimple);

Vars: Len1(3),Len2(3),Len3(3),OBOS(0),PPr(0),Op(0),HstH(0),LstL(0),Cntr(0),

DAmt(0),UAmt(0),USm(0),DSm(0),UAvg(0),DAvg(0),MRng(0);

{OB/OS}

Op=O[Len3];

HstH=_Hst(H,Len3);

LstL=_Lst(L,Len3);

PPr=(Op+HstH+LstL+C)/4;

If CurrentBar=1 then begin

MRng=Len1;

USm=0;

DSm=0;

For Cntr=0 to MRng-1 begin

UAmt=PPr[Cntr]-PPr[Cntr+1];

If (UAmt>=0) then

DAmt=0

Else begin

DAmt=-UAmt;

UAmt=0;

End;

USm=USm+UAmt;

DSm=DSm+DAmt;

End;

UAvg=USm/MRng;

DAvg=DSm/MRng;

End

Else

If CurrentBar>1 then begin

UAmt=PPr[0]-PPr[1];

IF UAmt>=0 then

DAmt=0

Else begin

DAmt=-UAmt;

UAmt=0;

End;

UAvg=(UAvg[1]*(MRng-1)+UAmt)/MRng;

DAvg=(DAvg[1]*(MRng-1)+DAmt)/MRng;

End;

IF UAvg+DAvg0 then

OBOS=100*UAvg/(UAvg+DAvg)

Else

OBOS=0;

_OBOS=OBOS;

all are welcome to use this as a nice filter!

thanks!

 

anybody want to tackle this? it's supposed to be walter bressert's most statistically accurate indicator, along with the double stochastic which i use on a regular basis for filtering as well...

 

i hope that some coders help..

 

I don't know how but I am sure that if u put an image that shows how this indicator is behaving, it will engorage people to convert it for u

 

okay, here's a pic of the buy/sell paintbars in tradestation...

the trade isn't taken until the confirmation is given on the price bar, in the form of the red/blue dot... it enters on the breakout/breakdown of the bar where the indicator plotted.

Files:
bline.jpg  62 kb
 

do you have profit with this indicator?

 
ForexBoss:
do you have profit with this indicator?

why would i want someone to convert an ineffective indicator???

i don't use it as a standalone tool, but rather in conjunction with a few others to make more conservative trades.

so to answer your question, yes!

 

interesting. but noone can change it?

 

unknown function

HstH=_Hst(H,Len3);

LstL=_Lst(L,Len3);

What are the _Hst _Lst function be ?

Reason: