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

High-Low_Zig for Amibroker (AFL)

Copy & Paste Friendly
_SECTION_BEGIN("High-Low_Zig");
High_Reversal_Percent = Param("High-Reversal-%",5,3,10,0.5); //default 5
Low_Reversal_Percent = Param("High-Reversal-%",5,3,10,0.5); //default 5

High_Reversal_Period = Param("High-Reversal-Days",22,10,65,1); //default 22
Low_Reversal_Period = Param("High-Reversal-Days",22,5,65,1); //default 22

High_Reversal_Value =  HHV(H,High_Reversal_Period) * (1 - High_Reversal_Percent/100);
Low_Reversal_Value = LLV(L,Low_Reversal_Period) * (1 + Low_Reversal_Percent/100);


Trend_UP = High > High_Reversal_Value;
Trend_DN = Low < Low_Reversal_Value;

/* After the signal is genrated, we trade the next day/bar @ open 
Remove the Comment when doing backtesting*/

SetTradeDelays(1,1,1,1);
BuyPrice = Open;
SellPrice = Open;
ShortPrice = Open;
CoverPrice = Open;

SetPositionSize(100000,1); // Fixed 1 LAC allocation for every trade

// Is it possible to get both the signals same day??
// Don't know, anyway lets take precaution
 
Buy  = Trend_UP AND (NOT Trend_DN);
Sell = Trend_DN AND (NOT Trend_UP); 

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

Short = Sell;
Cover = Buy;



Plot( C, "Close", IIf(Trend_UP,colorBlue,IIf(Trend_DN,colorRed,colorBlack)),styleBar|styleThick   ); 
myshape = Buy * shapeUpArrow + Sell * shapeDownArrow ;
PlotShapes(myshape,IIf(Buy,colorBlue,IIf(Sell,colorRed,colorWhite)),0,IIf(Buy, Low, High));

_SECTION_END();
Back