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

Bill Wiliams (Alligator) for Amibroker (AFL)

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

Стратегия сыровата, но отображение по Билу не плохое….

Similar Indicators / Formulas

All in One
Submitted by Nahid about 14 years ago
Kase Peak Osc. V2 batu
Submitted by batu1453 over 10 years ago
Kase CD V2batu
Submitted by batu1453 over 10 years ago
Ichimoku
Submitted by prashantrdx over 10 years ago
Arvind' System
Submitted by akdabc over 14 years ago
Miftha remix for dse
Submitted by coolpace over 14 years ago

Indicator / Formula

Copy & Paste Friendly
/* Моя торговая стратегия "TREND" */
Title="";
GraphXSpace =10;
_SECTION_BEGIN("Price");
_N(Title = StrFormat("{{INTERVAL}} {{DATE}}  (%.2f%%)  O = %g, H = %g, L = %g, C = %g  V = " +WriteVal( V, 1.0 ) +" {{VALUES}}",SelectedValue( ROC( C, 1 )), O, H, L, C  ));
_SECTION_END();
/* ------------------------------------------- Данные оптимизации и константы --------------------------------*/
//Новые данные


/* -------------------------------------------- Индикаторы Билла Вильямса ------------------------------------*/
A=(H+L)/2;
var1=Wilders(A,34);
var2=Wilders(A,5);
var3=var2-var1;
var4=var3-Wilders(var3,5);
Var5=(H-L)/V;
AO=Var3;
AC=Var4;
AlligatorBlue=Ref(Wilders(A,13),-8);
AlligatorRed=Ref(Wilders(A,8),-5);
AlligatorGreen=Ref(Wilders(A,5),-3);

/* ------------------------------------------ Графики ----------------------------------------------------*/


/* Раскраска баров */
barcolor=IIf(AO>Ref(AO,-1) AND AC>Ref(AC,-1),colorGreen,IIf(AO<Ref(AO,-1) AND AC<Ref(AC,-1),colorRed,IIf(V>0 AND Var5<Ref(Var5,-1) AND V>Ref(V,-1),colorBlue,colorBlack)));

Plot(C,"Close",barcolor,64+styleNoTitle );
Plot(AlligatorBlue,"Челюсть",colorBlue,1+4+styleNoTitle );
Plot(AlligatorRed,"Язык",colorRed,1+4+styleNoTitle );
Plot(AlligatorGreen,"Губы",colorLime ,1+4+styleNoTitle );

/*  -------------------------------------------- Фракталы -------------------------------------------------*/
// Фрактал "ВВЕРХ"
FrUp1=
(Ref(H,-3)>Ref(H, -2) AND Ref(H,-3)>Ref(H,-1) AND Ref(H,-3)>Ref(H, -4) AND Ref(H,-3)>Ref(H,-5));
FrUp2=
(Ref(H,-4)>Ref(H,-5) AND Ref(H,-4)>Ref(H,-6) AND Ref(H,-4)==Ref(H,-3) AND Ref(H,-4)>Ref(H,-2) AND Ref(H,-4)>Ref(H,-1)) OR
(Ref(H,-4)>Ref(H,-5) AND Ref(H,-4)>Ref(H,-6) AND Ref(H,-4)>Ref(H,-3) AND Ref(H,-4)==Ref(H,-2) AND Ref(H,-3)>Ref(H,-1));
FrUp3=
(Ref(H,-5)>Ref(H,-6) AND Ref(H,-5)>Ref(H,-7) AND 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)) OR
(Ref(H,-5)>Ref(H,-6) AND Ref(H,-5)>Ref(H,-7) AND 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)) OR
(Ref(H,-5)>Ref(H,-6) AND Ref(H,-5)>Ref(H,-7) AND 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));
ttt=IIf(FrUp1,3,IIf(FrUp2,4,5));
FrUp_Val=ValueWhen(FrUp1 OR FrUp2 OR FrUp3,Ref(H,-ttt),1);

Plot(FrUp_Val,"FrUp",colorDarkGreen,512+8);

// Фрактал "ВНИЗ"
FrDw1=
(Ref(L,-3)<Ref(L, -2) AND Ref(L,-3)<Ref(L, -1) AND Ref(L,-3)<Ref(L,-4) AND Ref(L,-3)<Ref(L,-5));
FrDw2=
(Ref(L,-4)<Ref(L,-5) AND Ref(L,-4)<Ref(L,-6) AND Ref(L,-4)==Ref(L,-3) AND Ref(L,-4)<Ref(L,-2) AND Ref(L,-4)<Ref(L,-1)) OR
(Ref(L,-4)<Ref(L,-5) AND Ref(L,-4)<Ref(L,-6) AND Ref(L,-4)<Ref(L,-3) AND Ref(L,-4)==Ref(L,-2) AND Ref(L,-4)<Ref(L,-1));
FrDw3=
(Ref(L,-5)<Ref(L,-6) AND Ref(L,-5)<Ref(L,-7) AND 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)) OR
(Ref(L,-5)<Ref(L,-6) AND Ref(L,-5)<Ref(L,-7) AND 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)) OR
(Ref(L,-5)<Ref(L,-6) AND Ref(L,-5)<Ref(L,-7) AND 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));
ggg=IIf(FrDw1,3,IIf(FrDw2,4,5));
FrDw_Val=ValueWhen(FrDw1 OR FrDw2 OR FrDw3,Ref(L,-ggg),1);

Plot(FrDw_Val,"FrDw",colorDarkRed,512+8);

/* --------------------------------------- Торговая стратегия -----------------------------------------------*/

// Определяем игровые зоны
green_zone=(C>AlligatorBlue AND C>AlligatorRed AND C>AlligatorGreen);
red_zone=(C<AlligatorBlue AND C<AlligatorRed AND C<AlligatorGreen);
gray_zone=(green_zone==False) AND (red_zone==False);
TWR_GREEN=AO>Ref(AO,-1) AND AC>Ref(AC,-1) AND Ref(AC,-1)>Ref(AC,-2);
TWR_RED=AO<Ref(AO,-1) AND AC<Ref(AC,-1) AND Ref(AC,-1)<Ref(AC,-2);
TWR_GRAY_BUY=AO>0 AND AO<Ref(AO,-1) AND AC>Ref(AC,-1);
TWR_GRAY_SELL=AO<0 AND AO>Ref(AO,-1) AND AC<Ref(AC,-1);

// Определяем зону входа в LONG

GOOD_LONG_ZONE=((green_zone OR gray_zone) AND (TWR_GREEN OR TWR_GRAY_BUY));
GOOD_SHORT_ZONE=((red_zone OR gray_zone) AND (TWR_RED OR TWR_GRAY_SELL));

// Сигналы для входа в LONG
Sg_Buy_Cross_FrUp=Ref(H,-1)<=FrUp_Val AND H>FrUp_Val AND FrUp_Val>Ref(AlligatorRed,-ttt);
Sg_Buy=Sg_Buy_Cross_FrUp AND GOOD_LONG_ZONE;

Buy=(C>FrUp_Val AND C>AlligatorRed) AND AC>0;
Sell=C<FrDw_Val OR C<AlligatorRed;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=(C<FrDw_Val AND C<AlligatorRed) AND AC<0;
Cover=C>FrUp_Val OR C>AlligatorRed;
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);

PlotShapes( shapeUpArrow * Buy + shapeHollowDownArrow *Short, IIf( Buy, colorGreen, colorRed ),0,IIf(Buy,Low,High));
PlotShapes( shapeDownArrow*Sell + shapeHollowUpArrow*Cover, IIf( Cover, colorGreen, colorRed ),0,IIf(Cover,Low-C/2000,High+C/2000));

/*  End of Exploration Code. *//* Моя торговая стратегия "TREND" */

1 comments

1. Tinych

Давай еще. Go ahead colleague!

Leave Comment

Please login here to leave a comment.

Back