The macro code would look something like the below. I would strongly suggest Order Objects rather than Macros, much more flexibility. These would be placed in a indicator, and the indicator would buy or sell. The macro is the easy part, controlling the macro, number of positions, dealing with persistence if connection is lost, etc., etc., is the much harder part. A mistake could fire an order for every incoming tick! There is no strategy protection. If you are not comfortable coding and working through the logic, I suggest you hire someone to do it for you.
Code:MarketOrder("OncePerBar", Account,"Sell","Equity",Symbol,PositionQuantity);
"A mistake could fire an order for every incoming tick" that's was scary. If in easy language you set your strategy to buy have max one open position in any direction or every symbol to have maximum 2 open position, could that still happen?
Last edited: