Page 6                                                      

Metastock Custom Indicator Moving Averages

periods1:=Input("Periods of ROC",2,50,12);

periods2:=Input("Smoothing Period",1,50,1);

Input("horizontal line 1",-50,50,5);

Input("horizontal line 2",-50,50,-5);

Mov(ROC(C,periods1,%),periods2,S);

from Eric Kendall

 

Metastock SAR Exploration

{cola:BUY: this means: label column A as "BUY" and then enter the following formula:}

Cross(L,(SAR(.02,.2)))

{colb:SELL: this means: label colum B as "SELL" and then enter the following formula:}

Cross(SAR(.02,.2),H)

{enter the following in the filter section:}

cola=1 or colb=1

{where the AF=0.02 which you can change. try doing a sys test by replacing the numbers with opt1 & opt2}

{from Mike Anoldi}

 

Moving Average Channel

"The MetaStock moving average function has an option for displacing the mov both vertically and horizontally. most of the time, I prefer to use a mov channel in place of Bollinger Bands."

from L. and G. Issen

"I use moving average, instead of Bollinger Bands, creating three indicators in the following way, and saving them in a template:

Mov(C, 28,S) displaced +10%

Mov(C, 28,S) displaced - 10%

Mov(C, 28,S)

28 days is the basic span of time. Like the 10% +/-, this should be adjusted for each security and for the particular condition you are waiting for (buy/sell). When I see a buying opportunity ahead, I just draw another trio of faster MAs (keeping the slow on the chart) and use them, with other indicators/oscillators, to time the entry. Same process to exit the market."

from G.G.

 

Stochastic Momentum Indicator

{Appeared in the January 1993 issue of Stocks & Commodities magazine}

100 * ( Mov( Mov(C - (.5 * ( HHV(H,13) + LLV(L,13))),25,E),2,E) / (.5*Mov(
Mov( HHV(H,13) - LLV(L,13),25,E),2,E)))

 

True Strength Index

{Appeared in the January 1993 issue of Stocks & Commodities magazine}

100 * ( Mov( Mov( ROC(C,1,$),25,E),13,E) / Mov( Mov( Abs(
ROC(C,1,$)),25,E),13,E))

 

Linear Regression Slope

{The basic "programming" in MetaStock of the LRS-ROC indicator is like this:
NIO is the _basic_ number of points taken to calculate the ROCs. The four
ROCs _per day_ used for interpolation are:}

rll:=ROC(O,nio-1,%)/(nio-1);
rl:=ROC(O,nio,%)/nio;
rh:=ROC(O,nio+1,%)/(nio+1);
rhh:=ROC(O,nio+2,%)/(nio+2);

{Now, interpolation is done at a point XIO (0<=xio<=1), i.e., between the
points NIO and NIO+1, using a simple interpolation formula weighting with
the _distances_ of the four ROCs from the interpolation point XIO:}

rit:=(rll/(1+xio)+rl/(xio+.0001)+rh/(1-xio)+rhh/(2-xio))/(1/(1+xio)+1/(xio+.
0001)+1/(1-xio)+1/(2-xio));

{Then the LinearRegressionSlope is taken _twice_ (for numerical reasons)
from the interpolated ROC, using the basic number of points; i.e., NIO. That
is where we get our LRS-ROC indicator, named RO here:}

ro:=LinRegSlope(LinRegSlope(rit,nio),nio);

{NIO+XIO together represent the _real_ (not integer!) number of points or
days, the LRS-ROC indicator is calculated for, e.g. 4.57 days.
Unfortunately, MetaStock is not able to use _one_ real number (e.g., 4.57)
as input to be splitted into NIO and XIO and to be used in the formulas
above. So NIO and XIO have to be provided separately, because of the
restrictions in MetaStock, and both are subjected to some "optimization" in
accordance to the historical prices.

To be clear: This LRS-ROC indicator triggers _only the timing_ for
entering/closing a position, using an appropriate criterion. Additional
(also ROC-based) criterions are used to stay out/in during extreme
bearish/bullish situations.

Additionally: This "TA" is only one basic element of my option trading
system, primarily to catch some "special reality effects" that cannot be
modeled by example-based know-how recycling from historical data. But
probably this TA system may also be used as a "stand-alone" system.

rudolf stricker


LRS-ROC Indicator--another one

Lb:=Input("Look-Back Periods?",3,100,13);
ROC( LinRegSlope(C,Lb),Lb,$)

{by Adam Hefner}

 

Divergence Between Close and Indicator

Divergence between the Close and an Indicator (Rev. 03/18/97 from Equis Support) The following formula will calculate the correlation of the Close and the MACD. It is written using a "long form" MACD so that the time periods used by the MACD may be changed. This indicator shows "divergence" between the close and the indicator: In the Windows versions of MetaStock the formula is: Correl(((Sum(Cum(1)*(Mov(C,12,E)-Mov(C,26,E)),100))-(Sum(Cum(1),100)* Sum((Mov(C,12,E)-Mov(C,26,E)),100)/100))/((Sum(Power(Cum(1),2),100))- (Power(Sum(Cum(1),100),2)/100)),((Sum(Cum(1)*C,100))-(Sum(Cum(1),100)* Sum(C,100)/100))/((Sum(Power(Cum(1),2),100))-(Power(Sum(Cum(1),100),2)/100)),12,0) The interpretation of the indicator output is as follows: - .08 (80%) and lower is divergence between the Close and the MACD. - 1 is very strong divergence. + 1 is very strong correlation. The formula was constructed this way so that most other indicators may be used in place of the MACD. For example, here is the same indicator using the RSI(14): Correl(((Sum(Cum(1)*(RSI(14)),100))-(Sum(Cum(1),100)* Sum((RSI(14)),100)/100))/((Sum(Power(Cum(1),2),100))-(Power(Sum(Cum(1),100),2)/100)), ((Sum(Cum(1)*C,100))-(Sum(Cum(1),100)*Sum(C,100)/100))/((Sum(Power(Cum(1),2),100))- (Power(Sum(Cum(1),100),2)/100)),12,0)

 

MACD Tops and Bottoms

QUESTION: As you know, MACD is always bottoming or topping before crossing its trigger line. However, the MACD signal comes always a bit late compared to price movement. Is there any way to calculate the MACD first derivative function to identify MACD tops/bottoms, that could be use by the Explorer or the System Tester? -- Augustin Bataille, Belgium ANSWER: One way to do what you want would be using the 'Rate of Change' function. For example: RocPeriods:=1; ROC(MACD(),RocPeriods,$) or for the MACD histogram you would have RocPeriods:=1; ROC(MACD() - Mov(MACD(),9,E),RocPeriods,$) If that is to noisy, you could smooth it a bit with: RocPeriods := 1; MovAvePeriod :=1; ; Mov(3 * ROC(MACD(),RocPeriods,$) , MovAvePeriod,E) {the 3 just 'magnifies' the line on the plot but doesn't affect the calculation} or for the MACD histogram: RocPeriods := 1; MovAvePeriod :=1; ; Mov(3 * ROC(MACD() - Mov(MACD(),9,E),RocPeriods,$) , MovAvePeriod,E) Another way to do what you want would be to look for peaks and troughs using the 'Peak' and 'Trough' functions. I'm working on code to identify divergences using this method. -- Dr. Robert Jackson robert.jackson@utoronto.ca -QUESTION: As you know, MACD is always bottoming or topping before crossing its trigger line. However, the MACD signal comes always a bit late compared to price movement. Is there any way to calculate the MACD first derivative function to identify MACD tops/bottoms, that could be use by the Explorer or the System Tester? -- Augustin Bataille, Belgium ANSWER: One way to do what you want would be using the 'Rate of Change' function. For example: RocPeriods:=1; ROC(MACD(),RocPeriods,$) or for the MACD histogram you would have RocPeriods:=1; ROC(MACD() - Mov(MACD(),9,E),RocPeriods,$) If that is to noisy, you could smooth it a bit with: RocPeriods := 1; MovAvePeriod :=1; ; Mov(3 * ROC(MACD(),RocPeriods,$) , MovAvePeriod,E) {the 3 just 'magnifies' the line on the plot but doesn't affect the calculation} or for the MACD histogram: RocPeriods := 1; MovAvePeriod :=1; ; Mov(3 * ROC(MACD() - Mov(MACD(),9,E),RocPeriods,$) , MovAvePeriod,E) Another way to do what you want would be to look for peaks and troughs using the 'Peak' and 'Trough' functions. I'm working on code to identify divergences using this method. -- Dr. Robert Jackson robert.jackson@utoronto.ca -

 

Countback line for Metastock

(Note. This is very good, but the limitation is the lookback period. The

calculation point for the CBL line might be 5, 10, 15, 30 days away from

todays date.Also watch for the way 'gap' days are treated. Daryl Guppy)

Copied from StockCentral - Thanks Ken D

Well .... last weekend I replied to a post requesting a MetaStock solution for calculating the Countback Line discussed in Daryl Guppy's book "Share Trading: An Approach to Buying and Selling". Subequently, about 30 requests for the formulas I use were received. Not unexpectedly, a few defects were found with the original offerings. This helped forge a somewhat more robust solution, which is here given to the wider audience of this Forum, so that further improvements may be forthcoming. Alternatives of presentation style are many, according to taste, but we are here requesting improvements in substance, identification of possible flaws, or have real simplification benefits - please provide solutions where possible.

ACKNOWLEDGEMENTS .... With thanks to the several people who have commented, all constructively it is pleasing to say, particular credit is warranted by the significant contributions from Bryan Stanton and Siobhan Channon.

LIMITATIONS .... With MetaStock, there seems to be a need for two different formulas to handle the issue: - one for the CBL from a LOW (CBLlo), - the other for the CBL from a HIGH (CBLhi). The formulas given below were generated using v.6.52. Because of the use of PREV they won't work in some earlier MetaStock versions it seems, though a bit of thought should overcome this limitation - anyone able to comment? As written they are based upon relative prices over a DEFAULT cover of 13 days (but adjustable from 3 to 55 days) - this is one of the potential weaknesses which commands individual interpretation for a particular equity or contract, which may cycle more or less frequently and require different timeframes. Other indicators and assessments are, of course, needed to gauge the probability of a CBL-indicated counter-trend holding. Also, for particularly choppy or indecisive circumstances there may be a need to extend the Ref(H or L, -5) to a greater number of comparison days by appropriate copying and adjustments to the basically simple pattern in these formulas - but if it came to this perhaps the trade should be left alone anyway! Owing to price vagaries it is not unusual for a CBLhi to be less than a CBLlo calculation, or the converse, especially with low-gradient trends or sideways price movements.

NOTE: With each formula below, copy exactly from "HighDays" or "LowDays" down to "PREV )))))" into the Indicator Builder.

CBLhi:

HighDays := Input("Enter # days to cover last HIGH for CBL calc'n:", 3, 55, 13);

If(HIGH < HHV(HIGH, HighDays), {then ...} PREV, {previous CBLhi, else...} If(Ref(L,-2) < Ref(L,-1) AND Ref(L,-2) < L AND Ref(L,-1) < L, {then ...} Ref(L,-2), {2nd day back low, else...} If((Ref(L,-3)< Ref(L,-2) AND Ref(L,-3) < Ref(L,-1) AND Ref(L,-3) < L) AND (Ref(L,-2)< L OR Ref(L,-1) < L), {then ... } Ref(L,-3), {3rd day back low, else...} If((Ref(L,-4)< Ref(L,-3) AND Ref(L,-4) < Ref(L,-2) AND Ref(L,-4) < Ref(L,-1) AND Ref(L,-4) < L) AND (Ref(L,-3)< L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then... } Ref(L,-4), {4th day back low, else...} If((Ref(L,-5)< Ref(L,-4) AND Ref(L,-5) < Ref(L,-3) AND Ref(L,-5) < Ref(L,-2) AND Ref(L,-5) < Ref(L,-1) AND Ref(L,-5) < L) AND (Ref(L,-4)< L OR Ref(L,-3) < L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then ...} Ref(L,-5), {5th day back low, else...} PREV )))))

and for the CBL from a LOW

CBLlo:

LowDays := Input("Enter # days to cover last LOW for CBL calc'n:", 3, 55, 13);

If(LOW > LLV(LOW, LowDays), {then ...} PREV, {previous CBLlo, else...} If(Ref(H,-2) > Ref(H,-1) AND Ref(H,-2) > H AND Ref(H,-1) > H, {then ...} Ref(H,-2), {2nd day back high,else...} If((Ref(H,-3)> Ref(H,-2) AND Ref(H,-3) > Ref(H,-1) AND Ref(H,-3) > H) AND (Ref(H,-2)> H OR Ref(H,-1) > H), {then ... } Ref(H,-3), {3rd day back high,else...} If((Ref(H,-4)> Ref(H,-3) AND Ref(H,-4) > Ref(H,-2) AND Ref(H,-4) > Ref(H,-1) AND Ref(H,-4) > H) AND (Ref(H,-3)> H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then... } Ref(H,-4), {4th day back high,else...} If((Ref(H,-5)> Ref(H,-4) AND Ref(H,-5) > Ref(H,-3) AND Ref(H,-5) > Ref(H,-2) AND Ref(H,-5) > Ref(H,-1) AND Ref(H,-5) > H) AND (Ref(H,-4)> H OR Ref(H,-3) > H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then ...} Ref(H,-5), {5th day back high,else...} PREV )))))

Please advise of any problems or suggested improvements in calculating the CBL. It is again emphasized that this is by no means proposed as the best solution, but as ONE solution which seems to work. Regards.
 

Linking Metastock Updates to Excel Files

As I understand your desire, it's to take data from a MetaStock file and use it to update an Excel file. The way to have this update-process automatically done requires for you to have an OLE-link capable object (chart or indicator) to be present. In MetaStock this can be easy established by creating separate Charts for each security. Follow and execute these steps below. Here I am using a single daily closing price as object, for a simplified use of the Win 95's OLE program.

1. First make a new indicator Close Only :
-Start MetaStock and click the button for the Indicator Builder
-In Indicator Builder create a custom indicator named "Close Only"
(without the quotations) and in the formula field type CLOSE and click OK

2. To create a Close Only Template :
-Start the Win95-Explorer and create a new folder named OLE(which folder
will hold your Template and Charts used for this OLE) below your working
folder(that is holding your metastock files dat/dop/master/emaster etc.)
-Then switch back to MetaStock
-Open the by you desired security using Smart Charts as type
-Delete all other charts and all inner windows and all indicators that are open
in the current screen(=layout) except for the base securities' Price indicator
(the bar, line, sticks)
-Drag the newly created Close Only indicator down from the IB-Quick List
(from the small window in the middle at the top) and release it to have the newly
created indicator displayed in its own inner-window
-Now SAVE AS the current screen (with Template as the file type) using the
CloseOnly name(without a space) as the Template's name("CloseOnly.mwt")
-Close down MetaStock + Win95-Explorer

3. To create the separate Charts used for OLE :
-Start MetaStock (fresh again) and click New|Chart or click Open
-Click Apply Template (this action is always required prior to selecting a security)
and scroll to the OLE folder to apply the newly created CloseOnly Template
-On Opening of this New Chart the above mentioned Template's layout containing
the Price and the Close Only indicators will be displayed
-Now SAVE AS the current screen (with Chart as the file type) using the security's
name as the Charts' pointer name("SecurityX.mwc") to the newly created
OLE-folder
-Close Metastock

4. To create the OLE link from Metastock to an Excel spreadsheet :
-Start MetaStock (fresh again) and click Open
-Open the required security in the newly created OLE-folder
-Right-click to Select and click Copy to have the security's CloseOnly indicator
copied to the Clipboard
-Start Excel and check that the first cell at the top-left is been selected(=black
line bordered rectangle)
-Select the required cells by placing the mouse-pointer at the right corner of the
selected rectangle and click and press down the Left-mouse button and whilst
at the same time holding the mouse-button down, drag down this first column(A)
and release button until you have reached record row #999 and all of the
selected cells will be colered black(Note that this selection made, has to be
done in one(1) straight firm move down the column, eg a one single selection
has been made)
-Now let the mouse-pointer float on this blackened selection and Right-click to
choose Paste Special
-In the Paste Special's Dialog Window click the Paste Link radio-button and
choose CSV as file-type
-With plenty of system memory on board it will not take that long before the
Special Linked data is calculated and displayed (as the cell's contents), and
that the Link has been made
-Close and Save As the Excel file to the OLE folder(with standard XLS as file type)
with the security's name as the pointer name
-Each time now, that you Open this XLS-file again, automatically the Excel program
will have you prompted if you would to update the Link. Within the Excel program's
options (Tools|Options|Calculations or Edit|Link|Manual) you can pre-set this to
"manual" as well, but then you will have to click Edit|Link|Update Now to update
once the spreadsheet's above Linked cell selection entirely

A.
Note here that the more history is stored in your 'original' Metastock files, eg the
files the Chart uses as its base, the longer the column contents(displayed cells), the
longer it will take to calculate and also the more memory is being used, so you
will have to keep this 'history' as short as what can be possible for any fast results.

B.
Note here too that you can then apply the special instructions (mailed in a previous
mail to the List) to have the Linked cells' contents SPLIT UP over more cells in the
spreadsheet(s), so as to enable you to make calculations in Excel, eg using Excel's
cell linking(referencing) and formula language(the tiny editor) capabilities and/or
apply any of the other Excel program's features.

C.
Note here also that the above applies for MS6.x and Excel8.0(OfficePro97).

D.
To reverse this OLE linkage back into MetaStock , do not forget to create an
empty Inner Window first, prior to creating the Link.
In MS click Window|New Inner Window and then Right-click in this Inner Window and
choose Paste Special|Paste Link (with CSV as file type). See MS-Help or MS-Manual
or Equis' Customer|Support Website for more detailed instructions.

suggested by Ton Maas, ms-irb@wxs.nl


Metastock Expert Commentary by Michael Arnoldi

Review of : <symbol>
as of <date>
TODAY'S CLOSE WriteVal(CLOSE,2.3)
TOMORROW's
PROJECTED HIGH
WriteIf(C<O, "WRITEVAL(-L+ (H+2*L+C)/2,25.2)")
WriteIf(C>O, "WRITEVAL(-L+ (2*H+L+C)/2,25.2)")
WriteIf(C=O, "WRITEVAL(-L+ (H+L+2*C)/2,25.2)")
PROJECTED LOW
WriteIf(C<O, "WRITEVAL(-H+ (H+2*L+C)/2,25.2)")
WriteIf(C>O, "WRITEVAL(-H+ (2*H+L+C)/2,25.2)")
WriteIf(C=O, "WRITEVAL(-H+ (H+L+2*C)/2,25.2)")

BOLLINGER BANDS
CLOSING PRICE:WRITEVAL(C,2.3)
BOLLINGERBAND TOP:
WRITEVAL( BBandTop(C,21,E,2),13.3)
21 DAY MOVING AVERAGE:
WRITEVAL(MOV(C,21,E),13.3)
BOLLINGERBAND BOTTOM:
WRITEVAL( BBandBOT(C,21,E,2),13.3)



Plotting Forward Days

>I want an indicator that will project an exponential moving average into
>the next period (i.e., draw tomorrow's line). It would be really spiffy if I
>could pl ug in tomorrow estimated/projected close and be able to adjust
>the indicator based on various projected closes. --Steve Karnish


The formula below may be close to what you want, but it will not plot on the forward day. It will just plot the point where tomorrow's EMA would be. The equation is based on the MetaStock manual, page 459, concerning exponential moving averages. -- Chuck Wemlinger

TC:=Input("Tomorrow's close",0.001,1000,1);
MAP:=Input("Moving Average Period",2,144,55);
MA1:=Mov(C,MAP,E);
EPX:=2/(MAP+1);
MA2:=(TC*EPX)+(MA1*(1-EPX));
ValueWhen(1,Cum(1)=LastValue(Cum(1)),MA2)



MACD Additions

{These MetaStock MACD indicator formulas allow user input for parameters when run}

mp1:=Input("Short MA",1,377,13);
mp2:=Input("Long MA",1,377,34);
Mov(C ,mp1 ,E )- Mov(C ,mp2 ,E )
MACD signal line
mp1:=Input("Short MA",1,377,13);
mp2:=Input("Long MA",1,377,34);
mp3:=Input("Signal MA",1,377,89);
Mov( (Mov(C ,mp1 ,E )- Mov(C ,mp2 ,E )),mp3,E)

MACD - Signal Line
mp1:=Input("Short MA",1,377,13);
mp2:=Input("Long MA",1,377,34);
mp3:=Input("Signal MA",1,377,89);
(Mov(C,mp1,E)-Mov(C,mp2,E))-(Mov((Mov(C,mp1,E)-Mov(C,mp2,E)),mp3,E))

{Thanks to Keith Massey}



Gann High Low

{name: GANN-HiLo}

HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),
{then}1,
{else}If(CLOSE<Ref(Mov(L,3,S),-1),
{then}-1,
{else}0));
HLv:=ValueWhen(1,HLd<>0,HLd);
HiLo:=If(HLv=-1,
{then}Mov(H,3,S),
{else}Mov(L,3,S));
HiLo;
 

Gann-Swing

{Market swing is defined as:
Up = 2 higher highs,
Down = 2 lower highs.}
Us:=BarsSince((H > Ref(H,-1)) AND (Ref(H,-1) >
Ref(H,-2)));
Ds:=BarsSince((L < Ref(L,-1)) AND (Ref(L,-1) <
Ref(L,-2)));
Sd1:=If(Us=0,
{then}If(Ref(L,-1)<>LowestSince(1,Ds=0,L),
{then}1,
{else}0),
{else}If(Ds=0,
{then}If(Ref(H,-1)<>
HighestSince(1,Us=0,H),
{then}-1,
{else}0),
{else}0));
Sd2:=If(Sd1=1,
{then} If(Ref(BarsSince(Sd1=1),-1) >
Ref(BarsSince(Sd1=-1),-1),
{then}1,
{else}0),
{else} If(Sd1=-1,
{then}If(Ref(BarsSince(Sd1=1),-1) <
Ref(BarsSince(Sd1=-1),-1),
{then}-1,
{else}0),
{else}0));
TD1:=ValueWhen(1,Sd2<>0,Sd2);
Td1;
 

Gann-Trend

{Swing Direction}
Sd:= FmlVar("GANN-Swing","TD1") ;
{Swing Change High}
Sch:=If(Sd=1 AND Ref(sd,-1)=-1,
{then}1,
{else}0);
{Swing Change Low}
Scl:=If(Sd=-1 AND Ref(Sd,-1)=1,
{then}1,
{else}0);
{Peak Value}
Pv:=If(Scl=1,
{then}HighestSince(1,Sch=1,H),
{else}0);
{Trough Value}
Tv:=If(Sch=1,
{then}LowestSince(1,Scl=1,L),
{else}0);
{Trend Direction}
Td:=If(H>ValueWhen(1,Pv>0,Pv),
{then}1,
{else}If(L<ValueWhen(1,Tv>0,Tv),
{then}-1,
{else}0));
{UpTrend=1 DownTrend =-1}
Tdv:=ValueWhen(1,Td<>0,Td);
Tdv;

contributed by Adam Hefner



Create a Gann Swing Expert
Instructions

1. First create a new expert and name it whatever you want.

2a. under "trends" tab put this code for bullish:

ut:=FmlVar("GANN-Trend","TDV");
uplot:=If(BarsSince(Ut=1)<
BarsSince(Ut=-1),1,0);
uplot=1;

2b. and this for bearish:

dt:=FmlVar("GANN-Trend","TDV");
dplot:=If(BarsSince(dt=1)>
BarsSince(dt=-1),1,0);
dplot=1;

Then click on the "ribbon" option and turn off "Display Vertical Lines", I also turn off the corner option.

3a. Under highlights tab create a new and call it "HiLo Change", choose color, and enter this code:

HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),
{then}1,
{else}If(CLOSE<Ref(Mov(L,3,S),
-1),
{then}-1,
{else}0));
HLv:=ValueWhen(1,HLd<>0,HLd);
HLv<>Ref(HLv,-1);

3b. Create new and call it "Up-Trend", choose color, and enter this code:

ut:=FmlVar("GANN-Trend","TDV");
uplot:=If(BarsSince(Ut=1)<
BarsSince(Ut=-1),1,0);
uplot=1;

3c. Create new and call it "Down-Trend", choose color, and enter this code:

dt:=FmlVar("GANN-Trend","TDV");
dplot:=If(BarsSince(dt=1)>
BarsSince(dt=-1),1,0);
dplot=1;

4a. Under "Symbols" tab create new and call it " UpSwing", enter this code:

FmlVar("GANN-Swing","SD2")=1;

then under graphic choose "Buy Arrow", choose color (Dark Green), and small size, then pick "Above Price Plot".

4b. Create new and call it "DownSwing", enter this code:

FmlVar("GANN-Swing","SD2")=-1;

then under graphic choose "sell arrow", choose color (Dark Red), and small size, then pick "Below Price Plot".

As for the HiLo ....just plot it as a regular indicator and choose the last "style" option under "color/style" tab.

from Adam Hefner