Convert formula from TC2000 to Metastock

#1
I'm using the following TC2000 script to scan everyday (with EOD data) many forex currencies in order to find pairs that met my criteria.

But... I need desperately to convert it in Metastock but I haven't use metastock the last 6 years and all this is a nightmare in my head :(:(:(

So, I kindly ask if someone can help me to convert this in Indicator/Expert Advisor :) (I want to scan everyday my list of forex pairs)

(TC2000) Script for shorts :

O>L1 AND
C>L1 AND
L<L1 AND
O>XAvg(C,200) AND
C>XAvg(C,200) AND
L<XAvg(C,200) AND
XAVG(C,18)>XAVG(C,50) AND
XAVG(C,50)>XAVG(C,100) AND
XAVG(C,100)>XAVG(C,200)

O, C, L are Open, Close, Low of present candle. L1 is the Low of previous candle.

XAVG is Exponential Moving Average.

(TC2000) Script for longs :

O<H1 AND
C<H1 AND
H>H1 AND
O<XAvg(C,200) AND
C<XAvg(C,200) AND
H>XAvg(C,200) AND
XAVG(C,18)<XAVG(C,50) AND
XAVG(C,50)<XAVG(C,100) AND
XAVG(C,100)<XAVG(C,200) AND
C>5

I really appreciate if someone can help me.

Regards
Panos
 
#2
I'm using the following TC2000 script to scan everyday (with EOD data) many forex currencies in order to find pairs that met my criteria.

But... I need desperately to convert it in Metastock but I haven't use metastock the last 6 years and all this is a nightmare in my head :(:(:(

So, I kindly ask if someone can help me to convert this in Indicator/Expert Advisor :) (I want to scan everyday my list of forex pairs)

(TC2000) Script for shorts :

O>L1 AND
C>L1 AND
L<L1 AND
O>XAvg(C,200) AND
C>XAvg(C,200) AND
L<XAvg(C,200) AND
XAVG(C,18)>XAVG(C,50) AND
XAVG(C,50)>XAVG(C,100) AND
XAVG(C,100)>XAVG(C,200)

O, C, L are Open, Close, Low of present candle. L1 is the Low of previous candle.

XAVG is Exponential Moving Average.

(TC2000) Script for longs :

O<H1 AND
C<H1 AND
H>H1 AND
O<XAvg(C,200) AND
C<XAvg(C,200) AND
H>XAvg(C,200) AND
XAVG(C,18)<XAVG(C,50) AND
XAVG(C,50)<XAVG(C,100) AND
XAVG(C,100)<XAVG(C,200) AND
C>5

I really appreciate if someone can help me.

Regards
Panos
Hi,
you have i think made a mistake as (TC2000) Script for shorts : is i think for long. anyways here is the metastock formula for the same. check it if its ok. and reverse it for your long condition.

O > REF(L,-1) AND C > REF(L,-1) AND O > MOV(C,200,E) AND C > MOV(C,200,E)
AND L < REF(L,-1) AND MOV(C,18,E) > MOV(C,50,E) AND MOV(C,50,E) > MOV(C,100,E)
AND MOV(C,100,E) > MOV(C,200,E)

regds,
 
#3
Hi,
you have i think made a mistake as (TC2000) Script for shorts : is i think for long. anyways here is the metastock formula for the same. check it if its ok. and reverse it for your long condition.

O > REF(L,-1) AND C > REF(L,-1) AND O > MOV(C,200,E) AND C > MOV(C,200,E)
AND L < REF(L,-1) AND MOV(C,18,E) > MOV(C,50,E) AND MOV(C,50,E) > MOV(C,100,E)
AND MOV(C,100,E) > MOV(C,200,E)

regds,
Dear Serbaaz,

Sorry I delete my reply because I found errors. It was my mistake. I will check it careful and reply again.

Regards
Panos
 
Last edited:
#5
This equation is in AmiBroker format and I want to convert it to Metastock


t1 = OscP( 12, 26);
Cond1a = Cross ( t1, MACD() );
Cond1b = MACD() > -1 AND MACD() < 0;
Cond1 = Cond1a AND Cond1b;
Cond2 = MACD() > Signal() - .5;
Cond3 = Cross( 0, t1 );
 

Similar threads