VST Custom entry/exit signal testing..
The VST Custom indicator requires the input to be +1/-1.
A MetaStock user may be unsure about the way a formula or indicator will plot and an easy way to test for the +1/-1 plot is to enter the code into a simple indicator and plot on any open chart.
If the user has several formula to test an easy system is to have your code for testing entered into Windows Notepad. Copy/paste from Notepad to MetaStock.
Using one of the indicators on this post enter it into MetaStock using the Indicator Builder.
Copy/paste from this post and name it [ VST Custom-01-entry/exit indicator tester ]
Open the "VST Custom-01-entry/exit indicator tester" on any chart and then....
Right click on the indicator within the window to highlight it then left click. This will open up the properties window.
Click on the formula tab to display the formula and paste the next formula to test over the top of the original code.
Click OK at the bottom of the window and the new formula will now be displayed in the window.
Repeat the steps above, as required, until all formula are tested.
********************************************************************
{VST Custom formula entry/exit or indicator +1/-1 tester.
Trade at own risk!
Enter your own formula or indicator in the template below.}
x:=Input("Place your custom formula within Formula tab",0,0,0);
x:=Input("Entry/Exit output *must be* in +1/-1 format",0,0,0);
{*** Place your code below ***}
pds1:=21; {HHV (long) breakout periods}
pds2:=10; {LLV (short) breakout periods}
x:=4; {use Open=1 High=2 Low=3 Close=4 Vol=5}
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,C))));
entry:=x>Ref(HHV(x,pds1),-1);
exit:=x Mov(C,40,E) AND HHVBars(H,70)=0;
***********************************************************************
The indicator below can be used as a temlpate to enter separate entry/exit formula.
The formula entered is for demonstration only.
***********************************************************************
{VST Custom formula entry/exit instructions.
Trade at own risk!
Enter your own formula in the template below.
The formula must plot a [1] on any chart.
Entry/exit formula must end with a semicolon [;] }
x:=Input("Place your custom formula within Formula tab",0,0,0);
x:=Input("Entry/Exit output *must be* in +1/-1 format",0,0,0);
entry:= {<- Do not change entry parameter name}
{--------------Place your entry formula below this line------------}
BarsSince(Cross(2,RSI(2))=1)=6;
exit:= {<- Do not change exit parameter name}
{--------------Place your exit formula below this line-------------}
Cross(Ref(Mov(L,180,E),-1),C);
entry-exit {<- Do not change }
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment