Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
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...
Code:
{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 Alrt<>0 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 CXOver<>0 then begin
Plot1(Round(OBOSMY,1),"BLine");
Plot2(Round(OBOSMYC,1),"BLine_CO");
End;
Plot3(SellLine,"BLine_SL");
Plot4(BuyLine,"BLine_BL");
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+DAvg<>0 then
OBOS=100*UAvg/(UAvg+DAvg)
Else
OBOS=0;
_OBOS=OBOS;
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...
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.