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
/////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?