Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Trade Once A Month for Amibroker (AFL)
You can use this “switch code” to trigger a trade that will execute only once a month.
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 | /////Month Switch MonthCalc = Month (); newMonth = MonthCalc != Ref ( Month (),-1); monthswitch = 0; monthswitcharray[0] = monthswitch[0]; for ( j = 1; j < BarCount ; j++ ) { monthswitch = monthswitcharray[j-1]; if (newmonth[j] == 1) { monthswitch = 1; } if (monthswitch == 0) { Buy [j] = 0; Short [j] =0; } if ( Buy [j] OR Short [j]) { monthswitch = 0; } monthswitcharray[j] = monthswitch; } |
3 comments
Leave Comment
Please login here to leave a comment.
Back
No chart display from this code
Suicide code?