MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

GMMA Trailing Stop by Leon Wilson

The following formula produces a non returning volatility based trailing stop as determined by the extremities of both moving average groups.


GMMA Trailing Stop

Day:=Input("Day Entered Trade",1,31,7);
Mnth:=Input("Month Entered Trade",1,12,8);
Yr:=Input("Year Entered Trade",1985,2100,2011);
HoldingDays:=BarsSince(Day=DayOfMonth() AND Mnth=Month() AND Yr=Year());

Value1:=Sqrt(
(Mov(CLOSE,3,E)-Mov(CLOSE,15,E))
*
(Mov(CLOSE,3,E)-Mov(CLOSE,15,E)));

Value2:=Sqrt(
(Mov(CLOSE,30,E)-Mov(CLOSE,60,E))
*
(Mov(CLOSE,30,E)-Mov(CLOSE,60,E)));

Value3:=Input("Contingent Stop Periods",3,34,21);

Stop:=CLOSE-(Value1+Value2);

Down:=Sum(If(OPEN>CLOSE,CLOSE-LOW,CLOSE-LOW),Value3);
Up:=Sum(If(CLOSE>OPEN,OPEN-LOW,OPEN-LOW),Value3);
ConStop:=(Stop-((Down+Up)/Value3))-0.01;

(Round(
If(Stop>PREV,Stop,
If(Stop<PREV,PREV,Stop*Holdingdays))*100))/100;
(Round(
If(ConStop>PREV,ConStop,
If(ConStop<PREV,PREV,ConStop*holdingdays))*100))/100;



GMMA Trailing Stop by Leon Wilson

 

Source / From: TOP
http://www.wilsontechstats.com/software/MMAConstruction.htm
(Website unfortunately no longer exists)
 

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!