I am sure that the code to do what I need is simple, but I have tried for the last week to pull it off. I have an indicator that has alerts (so pretty easy to spot when to buy and sell in the code).

I have done my own tweaking by adding email alerts, but I could really do with a one liner (perhaps a few) to turn it into an EA.

Kindly in the source there are two little helpers.

Alert(Symbol(), " ", Period(), " XXXXX BUY XXXXXXX");


Alert(Symbol(), " ", Period(), " XXXXX SELL XXXXXXX");

Please could some one give me something simple, that will stop all trades and then buy(or sell) <x> lots at the time of the alerts, that I can paste into the code for testing.

Thanks in advance,