EA OPTIONS: v_lotsize Lot Size: [.01, .02, .03, .04, .05, 1, 2, 3, 4, 5, 6, 7, 10, 15, 20)] (this is to specify the lot size of each order the program places) v_maxorders Maximum number of open orders at a time (we will want to be able to specify a single lot open at a time at first and gradually raise this as we fine tune the program) v_sma SMA: (any numeric value) (this is to specify the SMA to use. We have tested 9 SMA and it does well but will want to adjust this from time to time) v_pipsfromsma Pips From SMA: (any numeric value) (to trigger a trade, the current price must be a certain number of pips above (for long) and below (for short) the SMA current price. v_longstoppct Stop % from Close: (-000.000) (we want to close a long trade when the price falls to X% below candle 1's close. It might be 75% of close or might be 125%. Allows us to adjust. v_shortstoppct Stop % from Candle (000.000) (we want to close a short trade when price rises to X% above candel 1's close. It might be 75% to 150% or more. We just need to be able to adjust. Program to write: CONDITIONS FOR LONG ORDER --------------------------------------------- On tick, if no active order, and current SMA price > candle 1 SMA price and candle 1 SMA price > candle 2 SMA price and candle 2 SMA price > candle 3 SMA price AND current price > current SMA price + v_pipsfromsma DO ACTION place LONG market order of v_lotsize CONDITIONS FOR SHORT ORDER ----------------------------------------------- if no active order and current SMA price < candle 1 SMA price and candle 1 SMA price < candle 2 SMA price and candle 2 SMA price < candle 3 SMA price, AND current price < current SMA price + v_pipsfromsma DO ACTION place SHORT market order of v_lotsize CONDITIONS TO CLOSE LONG ------------------------------------------ On tick, If active order LONG and current price < candle 1 low * v_longstoppct DO ACTION close all long orders CONDITIONS TO CLOSE SHORT -------------------------------------------- On tick, If active order LONG and current price > candle 1 high * v_shortstoppct DO ACTION close all short orders