Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Mother Candle Formation Strategy for Amibroker (AFL)
Here is another Trade Plan using simple candlestick analysis.
The idea on this strategy is to catch a break from a sudden move of a big candle move. It can be done on any time series of chart, but recommended on the 10 to 60 minute charts. Only one trade Per symbol per day, recommended to trade in minimum 7 symbols (mini lots). Optimization can be done only on profit and target for Entry we are using a plugin named “MotherCandle”. Plugin should be placed into amibroker (c/programfiles/amibroker/plugins) folder.This AFL will work only if microsoft visual c++ 2017 redistributable package (x86). You Can download from microsoft website https://go.microsoft.com/fwlink/?LinkId=746571.
Please Use Amibroker 6.0 above version For error Free trading Experience
Files
Indicator / Formula
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | _SECTION_BEGIN ( "Mother Candle Formation Strategy" ); /* Here is another Trade Plan using simple candlestick analysis. The idea on this strategy is to catch a break from a sudden move of a big candle move. It can be done on any time series of chart, but recommended on the 10 or 60 minute charts. Only one trade Per symbol per day,recommended to trade in minimum 7 symbols (mini lots). Optimization can be done only on profit and target for Entry we are using a plugin named "MotherCandle". Plugin should be placed into amibroker (c/programfiles/amibroker/plugins) folder. This AFL will work only if microsoft visual c++ 2017 redistributable package (x86). You Can dowload from microsoft website https://go.microsoft.com/fwlink/?LinkId=746571. Created By Viatrades Algo Team. viatradess@gmail.com */ SetPositionSize ( 1, spsShares ); SetBarsRequired ( sbrAll , sbrAll ); SetChartOptions ( 0, chartShowArrows | chartShowDates ); SetChartBkGradientFill ( colorBlack , colorBlack , colorBlack ); Plot ( C , "" , IIf ( C > O , colorBlueGrey , IIf ( C <= O , colorOrange , colorLightGrey ) ), 64 | styleNoTitle , 0, 0, 0, 0 ); GraphXSpace = 10; DN = DateNum (); TN = TimeNum (); function Asign( x ) { y = Null ; for ( i = 0; i < BarCount ; i++ ) { y[i] = x; } return y; } Target = Param ( "Target %" , 1, 0.1, 50, 0.01 ) / 100; StopLoss = Param ( "Stop Loss %" , 0.75, 0.1, 50, 0.01 ) / 100; DaysTrades = Param ( "Trades / Day" , 2, 0, 50, 1 ); DayStart = DN != Ref ( DN, -1 ); DayEnd = Ref ( DayStart, 1 ); ////If below line ( MotherCandle();) is in Black color please install microsoft visual c++ 2017 redistributable package (x86). //you Can dowload from microsoft website" https://go.microsoft.com/fwlink/?LinkId=746571 ". MotherCandle(); Buy = Asign( False ); Sell = Asign( False ); Short = Asign( False ); Cover = Asign( False ); BuyPrice = Null ; ShortPrice = Null ; BYPRSV = Null ; SHPRSV = Null ; LF1 = False ; LF2 = False ; SF1 = False ; SF2 = False ; LSL = Null ; SSL = Null ; LTGT = Null ; STGT = Null ; count = 0; for ( i = 1; i < BarCount ; i++ ) { if ( DayStart[i] == True ) { count = 0; } // Long Trade if ( BuyTrig[i] != 0 && High [i] >= BuyTrig[i] && LF1 == False && LF2 == False && DayStart[i] == False && count < DaysTrades ) { Buy [i] = True ; LF1 = True ; BYPRSV = BuyTrig[i]; if ( Open [i] > BYPRSV ) { BYPRSV = Open [i]; } LF2 = True ; count++; } if ( LF1 == False && Close [i - 1] < BuyTrig[i] ) { LF2 = False ; } if ( LF1 == True ) { BuyPrice [i] = BYPRSV; LSL[i] = BYPRSV - ( BYPRSV * StopLoss ); LTGT[i] = BYPRSV + ( BYPRSV * Target ); } if ( LF1 == True && High [i] > LTGT[i] ) { Sell [i] = True ; SellPrice [i] = Close [i]; LF1 = False ; BuyPrice [i] = Null ; LSL[i] = Null ; LTGT[i] = Null ; } if ( LF1 == True && Low [i] < LSL[i] ) { Sell [i] = True ; SellPrice [i] = Close [i]; LF1 = False ; BuyPrice [i] = Null ; LSL[i] = Null ; LTGT[i] = Null ; } if ( LF1 == True && DayEnd[i] == True ) { Sell [i] = True ; SellPrice [i] = Close [i]; LF1 = False ; BuyPrice [i] = Null ; LSL[i] = Null ; LTGT[i] = Null ; } // Short Trade if ( ShortTrig[i] != 0 && Low [i] < ShortTrig[i] && SF1 == False && SF2 == False && DayStart[i] == False && count < DaysTrades ) { Short [i] = True ; SF1 = True ; SHPRSV = ShortTrig[i]; if ( Open [i] < SHPRSV ) { SHPRSV = Open [i]; } SF2 = True ; count++; } if ( SF1 == False && Close [i - 1] > ShortTrig[i] ) { SF2 = False ; } if ( SF1 == True ) { ShortPrice [i] = SHPRSV; SSL[i] = SHPRSV + ( SHPRSV * StopLoss ); STGT[i] = SHPRSV - ( SHPRSV * Target ); } if ( SF1 == True && Low [i] < STGT[i] ) { Cover [i] = True ; CoverPrice [i] = Close [i]; SF1 = False ; ShortPrice [i] = Null ; SSL[i] = Null ; STGT[i] = Null ; } if ( SF1 == True && High [i] > SSL[i] ) { Cover [i] = True ; CoverPrice [i] = Close [i]; SF1 = False ; ShortPrice [i] = Null ; SSL[i] = Null ; STGT[i] = Null ; } if ( SF1 == True && DayEnd[i] == True ) { Cover [i] = True ; CoverPrice [i] = Open [i]; SF1 = False ; ShortPrice [i] = Null ; SSL[i] = Null ; STGT[i] = Null ; } } Plot ( BuyPrice , "Buy Price" , colorYellow , styleStaircase | styleDashed ); Plot ( LTGT, "Long Target" , colorBrightGreen , styleStaircase | styleDashed ); Plot ( LSL, "Long Stop Loss" , colorCustom12 , styleStaircase | styleDashed ); Plot ( ShortPrice , "Short Price" , colorYellow , styleStaircase | styleDashed ); Plot ( STGT, "Short Target" , colorBrightGreen , styleStaircase | styleDashed ); Plot ( SSL, "Short StopLoss" , colorCustom12 , styleStaircase | styleDashed ); PlotShapes ( IIf ( Buy , shapeUpArrow , shapeNone ), colorBlueGrey , 0, Low , -15, 0 ); PlotShapes ( IIf ( Short , shapeDownArrow , shapeNone ), colorOrange , 0, High , -15, 0 ); PlotShapes ( IIf ( Cover , shapeCircle , shapeNone ), colorBlueGrey , 0, Low , -35, 0 ); PlotShapes ( IIf ( Sell , shapeCircle , shapeNone ), colorOrange , 0, High , 35, 0 ); _SECTION_END (); |
13 comments
Leave Comment
Please login here to leave a comment.
Back
Thanks for sharing. So may errors. please correct
Hi MANIIS123,
Use amibroker version above 6.0 for better results and please follow the below steps
1) Download the Plugin attached
2) Plugin should be placed into amibroker (c/programfiles/amibroker/plugins) folder.
3)This AFL will work only if microsoft visual c++ 2017 redistributable package (x86) is Installed.
You Can dowload from microsoft website https://go.microsoft.com/fwlink/?LinkId=746571.
couple you please post screenshot of the indicator
got a warning of virus
What antivirus are you using and what was the warning? The file was checked using virustotal before it was approved and nothing was found:
https://www.virustotal.com/#/file/d21c25440e6996ec174cdd8af1fb448b924270d9a1c3b3326f0ff4690a2b52a1/detection
HI,ADMIN
THW ABOVE STRATEGY IS NOT EXECUTING SELL AND COVER ORDERS AS PER STRATEGY ,
THOUGH BUY AND SHORTS ARE GETTING …
THANKS.
Hi SPASHA ,
I have checked the STRATEGY in all algo system, it working perfectly
thanks
get synax error 30 identifier mother candle is unidentified
still lot of errors
1. mother candle undefined
2.Buytrig not intiated etc
we are using a plugin named “MotherCandle”.
Plugin should be placed into amibroker (c/programfiles/amibroker/plugins) folder.
This AFL will work only if microsoft visual c++ 2017 redistributable package (x86).
You Can dowload from microsoft website https://go.microsoft.com/fwlink/?LinkId=746571.
I installed successfully. But do not show buy / sell signals. Please help me.
Awsome sir thanks for this afl..
Giving accurate signals..
In my system sell orders are not getting in backtest.
Buy getting triggred with good profit.
In some scripts this afl working like we are running the market
It looks into future