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 ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
High-Low_Zig for Amibroker (AFL)
Copy & Paste Friendly
Back
_SECTION_BEGIN("High-Low_Zig");
High_Reversal_Percent = Param("High-Reversal-%",5,3,10,0.5); //default 5
Low_Reversal_Percent = Param("Low-Reversal-%",5,3,10,0.5); //default 5
High_Reversal_Value = Peak(H,5,1) * (1 - High_Reversal_Percent/100);
Low_Reversal_Value = Trough(L,5,1) * (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();