Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

MIX Auto Trading System for Amibroker (AFL)
savage
about 14 years ago
Amibroker (AFL)

Rating:
2 / 5 (Votes 3)
Tags:
trading system, amibroker, optimize

Short and Long optimizable trading system.

Similar Indicators / Formulas

open brake system
Submitted by pit65 over 14 years ago
NMA v 3.6 a optimiser
Submitted by gopal almost 14 years ago
NMA swing sys as suggested by empottasch
Submitted by rghunsimath almost 13 years ago
CCT CMO trading system
Submitted by overdrunk about 14 years ago
Detrended Price Oscillator System
Submitted by anandnst over 12 years ago
HaConnorsRSI
Submitted by RBuck almost 12 years ago

Indicator / Formula

Copy & Paste Friendly
// Оптимизируемые параметры. 
t1 = Optimize("Полупериод", 18, 18, 90, 3); 
/* первая цифра- по умолчанию, Min, Max, step. Значение по умолчанию используется при Back Test'e*/ 
t3 = Optimize("период стоп", 16, 1, 30, 3); 
pu = Optimize("добавить сверху", 10, 0, 10, 3); 
/* дробное число принимать нехочет, придется потом делить на 1000 */ 
pd = Optimize("добавить снизу", 10, 0, 10, 3); 

// Длинный TS 
Ad = IIf(Ref(L, -t1) == LLV(L,t1*2+1), 1, 0); 
bd = ValueWhen(Ad == 1,Ref(L,-t1), 1); // везде использую только первый фрактал 
bd = IIf(bd < LLV(L, t1), bd, LLV(L, t1)); 
a1d = IIf(Ref(H, -t1) == HHV(H, t1*2+1), 1, 0); 
b1d = ValueWhen(a1d == 1, Ref(H, -t1), 1); 
b1d = IIf(b1d > HHV(H, t1), b1d, HHV(H, t1)); 
tsd = (bd+b1d)/2; 
FloatTS2 = IIf(tsd > Ref(tsd, -1), 1, IIf(tsd < Ref(tsd,-1),-1, Ref(Ad, -1))); 

// Короткий TS 
t2 = t1/3; 
A = IIf(Ref(L, -t2) == LLV(L,t2 * 2+1), 1, 0); 
b = ValueWhen(A == 1,Ref(L,-t2), 1); 
b = IIf(b < LLV(L, t2), b, LLV(L, t2)); 
a1= IIf(Ref(H, -t2) == HHV(H, t2*2+1), 1, 0); 
b1 = ValueWhen(a1 == 1, Ref(H, -t2), 1); 
b1 = IIf(b1 > HHV(H, t2), b1, HHV(H, t2)); 
ts = (b+b1)/2; 
FloatTS1 = IIf(ts>Ref(ts,-1), 1, IIf(ts<Ref(ts,-1),-1, Ref(A, -1))); 

// Плавающие уровни 

A = IIf(Ref(L, -t3) == LLV(L, t3 * 2+1), 1, 0); 
b = ValueWhen( A == 1, Ref(L, -t3), 1); 
bb = ValueWhen(A == 1, Ref(L, -t3), 1); 
bbb = Min(LLV(L, t3), bb); 
A1 = IIf(Ref(H, -t3) == LLV(H, t3 * 2+1), 1, 0); 
b1 = ValueWhen(a1 == 1, Ref(H, -t3), 1); 
bb1 = ValueWhen(a1 == 1, Ref(H, -t3), 1); 
bbb1 = Max(HHV(H,t3), bb1); 
Coverstop = Ref(IIf(b1>bbb1, b1, bbb1), -1) + pu/1000; // стоп уровень выхода из Short 
Sellstop = Ref(IIf(b < bbb, b, bbb), -1) - pd/1000; // стоп уровень выхода из Long 
SellPrice = Sellstop; // Цена выхода из Long 
CoverPrice = Coverstop; // Цена выхода из Short 

// Вход и выход long 
Buy = FloatTS1 + FloatTS2 == 2 AND Ref(FloatTS2 + FloatTS1, -1) < 2; // Условие входа 
Sell = L < Sellstop; // Условие выхода 

// Вход и выход Short 
Short = FloatTS2 +FloatTS1 == -2 AND Ref(FloatTS2 + FloatTS1, -1) > - 2; // Условие входа 
Cover = H > Coverstop; // Условие выхода

1 comments

1. mrdzenli

Братан – красава!
Только не работает(

Leave Comment

Please login here to leave a comment.

Back