Convert VT Trader Code to Amibroker - Aussie Stock Forums

# Thread: Convert VT Trader Code to Amibroker

1. ## Convert VT Trader Code to Amibroker

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);

2. ## Re: Convert VT Trader Code to Amibroker

Newby with this and need more information on what HaC represents.

Any clues?

This maybe????

haclose:=(O+H+L+C)/4;

3. ## Re: Convert VT Trader Code to Amibroker

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 ) );

4. ## Re: Convert VT Trader Code to Amibroker

Tomasz has an explanation of the MS PREV loop function here. Not like a Ref function unfortunately.

http://www.mail-archive.com/amibroke.../msg26985.html

Hope this helps.

5. ## Re: Convert VT Trader Code to Amibroker

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?

6. ## Re: Convert VT Trader Code to Amibroker

Originally Posted by Dracuu
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?

7. ## Re: Convert VT Trader Code to Amibroker

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.

8. ## Re: Convert VT Trader Code to Amibroker

Originally Posted by Wysiwyg
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.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Aussie Stock Forums