Code: Select all
if MarketPosition = 0 then
if mod(time,2) = 0 then
buy next bar at market
else
sellshort next bar at market
else if MarketPosition = 1 then
sellshort next bar at market
else if MarketPosition = -1 then
buy next bar at market;
[1] Plot 1-min bar chart for 10 years period
[2] Apply the above signal.
[3] STD Exception: no enough memory will appear.
See attached screen shot. It will show VM usage too.