Make a code for Short and Long orders allowed only

 
Hi! One can easily make an EA only go short or long by manually shoosing it in the external settings of the EA when you put it on a live chart, but then it would not be automatic and you would have to sit by the computer all the time.Is there any code for Buy orders only allowed and Sell orders only allowed according to the Bollinger Band upper and lower line, that can easily be implemented in an allready existing EA? Or do you have to recode the hole EA?If you take the TopTrend indicator, it is indicating an upptrend or a downtrend, according to the bollingerband. This is just what I would like to have programmed into an EA as a buy order only and sell order only function.#The BB should get its variables only from the H4 period even if the EA is on a different time period.#When the price goes under the bottom line of BB and closes it should start Sell orders only, but it will still allow the EA to only do short posisions until the price goes over the upper line of BB and closes. There it should change the setting to Long mode. And vice vers the other way around.#When it goes from Short mode to Long mode or from Long mode into Short mode it should close all open orders(True or False option)Can take any EA as long as it has TP and SL only from the beginning.Is there anything like this or can somebody program it?//Thomas
Files:
TOPTREND.mq4  6 kb