Hedging Ea ( so every order works like a loop till its respective tp gets hit) Step 1 : Range selection(manual) For eg gbpusd Range selection should be in manual setting. for eg I select range from 1.41700 to 1.41800 difference = 100 point. Step 2 : Difference interval selection(manual) as (1,2,3,1-2,2-3,1-2-3) explanation of above manual setting is given below. For eg(1) i select range from above eg 1.41700 and 1.41800 and cmp is 1.41840 , i select differnce interval = 1. orders should be create above or below the range according to its difference , so here difference is 100 point. ea creates sell limit at 1.41900 and buy stop at 1.41900 and simultaneously ea creates buy limit at 1.41600 and sell stop at 1.41600 For eg(2) i select range same and differnce interval as 1-2. ea creates sell limit at 1.41900 and buy stop at 1.41900 ea creates sell limit at 1.42000 and buy stop at 1.42000 ea creates buy limit at 1.41600 and sell stop at 1.41600 ea creates buy limit at 1.41500 and sell stop at 1.41500 for eg(3) i select 2. ea creates sell limit at 1.42000 and buy stop at 1.42000 ea creates buy limit at 1.41500 and sell stop at 1.41500 for eg(4) i select 1-2-3. ea creates sell limit at 1.41900 and buy stop at 1.41900 ea creates sell limit at 1.42000 and buy stop at 1.42000 ea creates sell limit at 1.42100 and buy stop at 1.42100 ea creates buy limit at 1.41600 and sell stop at 1.41600 ea creates buy limit at 1.41500 and sell stop at 1.41500 ea creates buy limit at 1.41400 and sell stop at 1.41400 so depending upon the interval ea creates order above or below with difference in interval selected. Step 3 : Now the stop loss(manual) (1,2,3,4,5,6,7,8,9,10) stop loss = difference / above numbers. Depending on stop loss , difference of range gets divided so for above eg range is 1.41700 to 1.41800. For eg (1) i select difference interval = 1-2 stop loss division = 1 difference in range = 100 points stop loss = 100/1 = 100 points so selected difference interval is 1-2 ea creates sell limit at 1.41900 with 1.42000 as buy stop and stop loss and buy stop at 1.41900 with 1.41800 as stop loss and sell stop. ea creates sell limit at 1.42000 with 1.42100 as buy stop and stop loss and buy stop at 1.42000 with 1.41900 as stop loss and sell stop. ea creates buy limit at 1.41600 with 1.41500 as stop loss and sell stop and sell stop at 1.41600 with 1.41700 as buy stop and stop loss. ea creates buy limit at 1.41500 with 1.41400 as stop loss and sell stop and sell stop at 1.41500 with 1.41600 as buy stop and stop loss. for eg (2) select difference interval = 1-2 stop loss division = 2 difference in range = 100 points stop loss = 100/2 = 50 points. ea creates sell limit at 1.41900 with 1.41950 as buy stop and stop loss and buy stop at 1.41900 with 1.41850 as stop loss and sell stop. ea creates sell limit at 1.41950 with 1.42000 as buy stop and stop loss and buy stop at 1.41950 with 1.41900 as stop loss and sell stop. ea creates sell limit at 1.42000 with 1.42050 as buy stop and stop loss and buy stop at 1.42000 with 1.41950 as stop loss and sell stop. ea creates sell limit at 1.42050 with 1.42100 as buy stop and stop loss and buy stop at 1.42050 with 1.42000 as stop loss and sell stop. ea creates sell limit at 1.42100 with 1.42150 as buy stop and stop loss and buy stop at 1.42100 with 1.42050 as stop loss and sell stop. ea creates buy limit at 1.41600 with 1.41550 as stop loss and sell stop at 1.41600 with 1.41650 as buy stop and stop loss. ea creates buy limit at 1.41550 with 1.41500 as stop loss and sell stop at 1.41550 with 1.41600 as buy stop and stop loss. ea creates buy limit at 1.41500 with 1.41450 as stop loss and sell stop at 1.41500 with 1.41550 as buy stop and stop loss. ea creates buy limit at 1.41450 with 1.41400 as stop loss and sell stop at 1.41450 with 1.41500 as buy stop and stop loss. ea creates buy limit at 1.41400 with 1.41350 as stop loss and sell stop at 1.41400 with 1.41450 as buy stop and stop loss. so depending upon the difference interval and stop loss limit orders are placed. for eg(3) range difference = 100points difference interval = 1 stop loss = 5 stop loss = 100/5 = 20 points so now ea creates sell limit at 1.41900 with 1.41920 as buy stop and stop loss and buy stop at 1.41900 with 1.4880 as stop loss and sell stop. ea creates sell limit at 1.41920 with 1.41940 as buy stop and stop loss and buy stop at 1.41920 with 1.41900 as stop loss and sell stop. ea creates sell limit at 1.41940 with 1.41960 as buy stop and stop loss and buy stop at 1.41940 with 1.41920 as stop loss and sell stop. ea creates sell limit at 1.41960 with 1.41980 as buy stop and stop loss and buy stop at 1.41960 with 1.41940 as stop loss and sell stop. ea creates sell limit at 1.41980 with 1.42000 as buy stop and stop loss and buy stop at 1.41980 with 1.41960 as stop loss and sell stop. ea creates sell limit at 1.42000 with 1.42020 as buy stop and stop loss and buy stop at 1.42000 with 1.41980 as stop loss and sell stop. ea creates buy limit at 1.41600 with 1.41580 as stop loss and sell stop at 1.41600 with 1.41620 as buy stop and stop loss. ea creates buy limit at 1.41580 with 1.41560 as stop loss and sell stop at 1.4580 with 1.41600 as buy stop and stop loss. ea creates buy limit at 1.41560 with 1.41540 as stop loss and sell stop at 1.4560 with 1.41580 as buy stop and stop loss. ea creates buy limit at 1.41540 with 1.41520 as stop loss and sell stop at 1.4540 with 1.41560 as buy stop and stop loss. ea creates buy limit at 1.41520 with 1.41500 as stop loss and sell stop at 1.4520 with 1.41540 as buy stop and stop loss. ea creates buy limit at 1.41500 with 1.41480 as stop loss and sell stop at 1.4500 with 1.41520 as buy stop and stop loss. Step 4 : Take profit (manual) = (1,2,3,4,5,6,7,8,9,10,......) if i select 1 = 1:1 if i select 2 = 1:2 if i select 3 = 1:3 if i select 10 = 1:10 keep it in multipication of stop loss kind of in manual setting. for eg stoploss * 1 = 1:1 stoploss * 2 = 1:2 stoploss * 3 = 1:3 Step 5 : Lot size (manual) i want lot size totally manually given if i kept (0.02,0.02,0.03,0.05,0.05,0.06,0.07,0.08,0.09,0.11) max 10 only , so ea should able to read the lot size order in line. means if first order hits stop loss next order will open the lot size which is mentioned at second, likewise if second hit stoploss lot size from above eg will be 0.03 for third order and so on till last if 9th time stoploss gets hit and last lot size is 0.11 so ea should open 0.11 for 10th time, 11thtime and so on if more sl gets hit the last lot size will be used for the next orders. if i kept (0.02,0.05,0.08) ea will open lot size for first order is 0.02 if first order hits sl den 0.05 lot second order hits sl den 0.08 lot third order hits sl den 0.08 lot fourth order hits sl den 0.08 lot and so on last lot will remain same for next orders once it completes all the lots in line mentioned. Step 6 : Once tp hits for an interval , ea should create new fresh order at that interval price of which take profit has been hitted with first mentioned lot size and continue the process. for eg lot size is (0.02,0.05,0.08) for eg sell limit at 1.41900 with 1.41950 as buy stop and stop loss (lot size 0.08 for this running order), tp is 1:2 and sell limit of 1.41900 hits tp at 1.41800 so buy stop at 1.41950 closes automatically. new fresh order opens at sell limit at 1.41900 with 1.41950 as buy stop with lot size 0.02 as 0.02 is the first lot size. Important : 1: once tp hits for an order its corresponded order closes automatically with it. so for eg sell limit at 1.41900 with 1.41950 as buy stop and stop loss tp is 1:2 sell limit of 1.41900 hits tp at 1.41800 so buy stop at 1.41950 closes automatically. 2: Ea starts a fresh order at the position of which take profit has hitted mentioned in step6. 3: manual settings : Range difference Difference interval Stop loss Take profit Lot size