Australian (ASX) Stock Market Forum

Convert VT Trader Code to Amibroker

Joined
28 January 2009
Posts
46
Reactions
0
Hi All,

I have been trying to convert a system I am using on VT-Trader (Which I think is similar to Metastock code) to Amibroker but I am unable to get my head around the looping stuff in regards to the PREV function. I just cannot get it to work the way it should.

Can anyone please help me?

This is the VT code

{RGM Master Trading System}

RGM_Power_Line_Setup:= (Wilders(ATR(30),24)*2.824);

RGM_Power_Line:= If(BarCount()>(30+24),
If(Ref(HaC,-1)>PREV(0) AND HaC>PREV(0),Max(PREV(0),HaC-RGM_Power_Line_Setup),
If(Ref(HaC,-1)<PREV(0) AND HaC<PREV(0),Min(PREV(0),HaC+RGM_Power_Line_Setup),
If(Cross(HaC,PREV(0)),HaC-RGM_Power_Line_Setup,
If(Cross(PREV(0),HaC),HaC+RGM_Power_Line_Setup,
If(HaC=PREV(0),PREV(0),PREV(0)))))),
NULL);

{Signal Buy and Sell}

LongSignal:= Cross(C,RGM_Power_Line);
ShortSignal:= Cross(RGM_Power_Line,C);
 
Newby with this and need more information on what HaC represents.

Any clues?

This maybe????

haclose:=(O+H+L+C)/4;
 
Sorry I should have specified what HaC was. HaC is "Heiken-Ashi Close".

Heiken-Ashi bars can be defined in Amibroker like this -

//Define What Heiken-Ashi Bars are.

HaC = (O+H+L+C)/4;
HaO = AMA( Ref( HaC, -1 ), 0.5 );
HaH = Max( H, Max( HaC, HaO ) );
HaL = Min( L, Min( HaC, HaO ) );
 
Thanks mate, I had already looked at that and pretty much every other bit of info on the web but still I cannot get it to work. I end up with something that looks nothing like what it should and it grinds my computer to a halt.

Anyone else?
 
Thanks mate, I had already looked at that and pretty much every other bit of info on the web but still I cannot get it to work. I end up with something that looks nothing like what it should and it grinds my computer to a halt.

Anyone else?

How about you try and explain what the system is meant to do?
 
Saiter, I got the XAO symmetrical triangle breakout target at 5070 using Bulkowski's percentage method. Also have the apex near 20th of January. Thought the apex might interest since you did make note of the pattern.
 
Saiter, I got the XAO symmetrical triangle breakout target at 5070 using Bulkowski's percentage method. Also have the apex near 20th of January. Thought the apex might interest since you did make note of the pattern.

The apex lined up reasonably close hey Saiter? Maybe you should trade things like this if you have a belief in them.
 
Top