MetaStock™ Zone Tworzenie Sytemów Trader Shop Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 

Meander system v. 1
For the Trading System Lab page:

Typ : Signal, Name : Meander system v. 1

Vars: SumVS(0),
AvgVS(0),
DiffVS(0),
StdVS(0),
SetArr(0),
SumArr(0),
DiffArr(0),
VSLow(0),
VSMid(0),
VSHigh(0),
RiskReward(0);
Array: VS[20](0);

For SetArr = 0 To 4 Begin
VS[SetArr * 4 + 0] = (Open[SetArr] - AvgPrice[SetArr + 1]) / AvgPrice[SetArr + 1];
VS[SetArr * 4 + 1] = (High[SetArr] - AvgPrice[SetArr + 1]) / AvgPrice[SetArr + 1];
VS[SetArr * 4 + 2] = (Low[SetArr] - AvgPrice[SetArr + 1]) / AvgPrice[SetArr + 1];
VS[SetArr * 4 + 3] = (Close[SetArr] - AvgPrice[SetArr + 1]) / AvgPrice[SetArr + 1];
End;

For SumArr = 0 To 19 Begin
If SumArr = 0 Then
SumVS = 0;
SumVS = SumVS + VS[SumArr];
If SumArr = 19 Then
AvgVS = SumVS / 20;
For DiffArr = 0 To 19 Begin
If DiffArr = 0 Then
DiffVS = 0;
DiffVS = DiffVS + Square(VS[DiffArr] - AvgVS);
If DiffArr = 19 Then
StdVS = SquareRoot(DiffVS / 20);
End;
End;

VSLow = AvgPrice * (1 + (AvgVS - StdVS * 2));
VSMid = AvgPrice * (1 + AvgVS);
VSHigh = AvgPrice * (1 + (AvgVS + StdVS * 2));
If MarketPosition = 0 Then Begin
Buy ("Buy") Tomorrow at VSLow Limit;
RiskReward = VSMid-VSLow;
End;

If MarketPosition = 1 Then
ExitLong ("PT") Tomorrow At VSHigh Limit;
If MarketPosition = 1 Then
ExitLong ("TS") Tomorrow At VSLow Stop;
If Open Tomorrow >= VSLow Then
ExitLong ("SLa") From Entry ("Buy") At (VSLow-(VSMid-VSLow)) Stop;
If Open Tomorrow < VSLow Then
ExitLong ("SLb") From Entry ("Buy") At (Open Tomorrow-(VSMid-VSLow)) Stop;

 

t-s-Meander_system_v_1.gif
Source / From: TOP
http://www.activetradermag.com

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 niesie ze sob± ryzyko poważnych strat finansowych!