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

Bear Fear for Amibroker (AFL)
gera
almost 9 years ago
Amibroker (AFL)

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

Bull Fear / Bear Fear with DX Trading System

- Developed by Jef
- Published in http://www.nt-tech.com.au/guppy

Similar Indicators / Formulas

COMBO TRADE AFL
Submitted by SREENAN about 9 years ago
Simple Buy Sell
Submitted by ajeet almost 8 years ago
RAJASWAMY INVESTING PURPOSE
Submitted by rajaswamy almost 9 years ago
Buy And Sell
Submitted by Amarjit over 8 years ago
Reaction Trend System
Submitted by ajayjain90 over 9 years ago
ema crossovers
Submitted by rushee.g1100 about 9 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN(" Bear Fear");
// BBFEAR.AFL v 0.001 24/01/2002
// Bull Fear / Bear Fear with DX Trading System
// Developed by Jef
// Published in http://www.nt-tech.com.au/guppy/
// Coded by Marek Chlopek, January 2002


// ****************************************************************************************
// INITIALIZATION OF EXPLORATION IN AMIBROKER 
// ****************************************************************************************
Filter = 1;
NumColumns = 5;
Column0 = O; Column0Name = "O"; Column0Format = 1.2;
Column1 = H; Column1Name = "H"; Column1Format = 1.2;
Column2 = L; Column2Name = "L"; Column2Format = 1.2;
Column3 = C; Column3Name = "C"; Column3Format = 1.2;
Column4 = V; Column4Name = "V"; Column4Format = 1.0;

// END OF "INITIALIZATION OF EXPLORATION IN AMIBROKER" SECTION


// ****************************************************************************************
// MAIN CODE
// ****************************************************************************************
Opt1 = Optimize("DX Level", 16, 10, 30, 1);
Opt2 = Optimize("Period", 15, 10, 50, 1); // n

n = Opt2;
BullFear = (HHV(High,n) - LLV(High,n))/2 + LLV(High,n);
BearFear = (HHV(Low,n) - LLV(Low,n))/2 + LLV(Low,n);

// Exploration in Amibroker
AddColumn(BullFear, "BullFear", format=1.2);
AddColumn(BearFear, "BearFear", format=1.2);

// END OF "MAIN CODE" SECTION


// ****************************************************************************************
// TRADING SYSTEM ENTRY FORMULAS
// ****************************************************************************************
Buy   = Cross(Close, BullFear) AND ADX(10) > Opt1;
Short = Cross(BearFear, Close);

// Exploration in Amibroker
AddColumn(Buy,        "Buy",        format=1.0);
AddColumn(Short,      "Short",      format=1.0);
//AddColumn(BuyPrice,   "BuyPrice",   format=1.2);
//AddColumn(ShortPrice, "ShortPrice", format=1.2);

// END OF "TRADING SYSTEM ENTRY FORMULAS" SECTION


// ****************************************************************************************
// TRADING SYSTEM EXIT FORMULAS
// ****************************************************************************************
Sell  = Short;
Cover = Buy;

// Exploration in Amibroker
AddColumn(Sell,       "Sell",       format=1.0);
AddColumn(Cover,      "Cover",      format=1.0);
//AddColumn(SellPrice,  "SellPrice",  format=1.2);
//AddColumn(CoverPrice, "CoverPrice", format=1.2);

// END OF "TRADING SYSTEM EXIT FORMULAS" SECTION


// ****************************************************************************************
// TRADING SYSTEM EXCESSIVE ENTRY/EXIT SIGNALS REMOVING FORMULAS
// ****************************************************************************************
Buy   = ExRem(Buy, Sell);
Sell  = ExRem(Sell, Buy);
Short = ExRem(Short, Cover);
Cover = ExRem(Cover, Short);

// END OF "TRADING SYSTEM EXCESSIVE ENTRY/EXIT SIGNALS REMOVING FORMULAS" SECTION


// ****************************************************************************************
// GRAPHIC PRESENTATION IN AMIBROKER
// ****************************************************************************************
MaxGraph = 3;
Graph0 = C; Graph0Style = 4; Graph0Color = 1;
Graph1 = BullFear; Graph1Style = 1; Graph1Color = 5;
Graph2 = BearFear; Graph2Style = 1; Graph2Color = 4;

Title = Name()
        + " - C (Black) = " + WriteVal(Graph0, 1.2)
        + ", BullFear (Green) = " + WriteVal(Graph1, 1.2)
        + ", BearFear (Red) = " + WriteVal(Graph2, 1.2);

// END OF "GRAPHIC PRESENTATION IN AMIBROKER" SECTION


// ****************************************************************************************
// END OF CODE (BBFEAR.AFL)
// ****************************************************************************************
/**/
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back