Spec Doc Rejection After Market Revisits High/Low Point. 6/6/2016 Overview: When the market reaches a new high (or new low) “The Control Point” and then retraces from that control point by a minimum e.g. 100 pips (Minimum_Pips_Retrace_From_Control). And a minimum time passes e.g. 50 days (Minimum_Days_Must_Pass). And then the market goes back up to that Control Point, we enter a sell order when the market reaches that previous high point (The Control Point) because we expect the price to be rejected from this high point. We want an option to split the sell order into equal parts, from 1 to 5 parts, (Split_Order_Into_Equal_Parts), and place the parts slightly below the control, at the control and slightly above the control. The reason is the market may not go exactly to the control. It might stop a little short or it might go a bit past it. So, if we make Split_Order_Into_Equal_Parts = 3, one part will be below the control, one part will be at the control and one part above the control. If we use input = 4, then 2 parts will be below the control and 2 parts above the control. In this case there will be no part at the control point. There will be a gap between the parts (Pips_Gap_Between_Parts) e.g. = 5 pips. If Split_Order_Into_Equal_Parts = 1, then Pips_Gap_Between_Parts will not be used and will not work. If we use Split_Order_Into_Equal_Parts = 2 or higher, each part will have its OWN TP and SL, meaning if TP = 20 and SL = 20, each part will close with TP of 20 and SL of 20 at a different market price (because of the gap between the order parts). Each order part will work on it’s own TP and SL. Use market orders. Use “close by” function of MT4 to close the orders with TP or SL. This way the broker will not see my TP and my SL. Number trades allowed at same control point: Let’s assume we use only one order part. If the order goes to SL, the trade is over. We need to wait for main condition to present itself again (minimum days to pass and minimum retracement distance to be met). But if the order goes to TP and the market goes back to the control point, we want to place another order in the exact same place. If it is TP and goes back to the control point I want again to place an order again. Number_Trades_Allowed_After_TP. So if = 1, we will have maximum 2 trades. If = 2 we will have maximum 3 trades. However, If the position is SL, regardless of the setting on this input, the trade is over. Now, let’s assume we have multiple order parts. Each order part works independently. Each order part is treated individually like the above paragraph. When all the parts are SL the trade is over. When all parts are TP and Number_Trades_Allowed_After_TP is met, the trade is over. Note: If move to break even is used, see below, and the position is closed with SL but there is no loss, it is NOT counted as a SL. Connection warning: If broker and my VPS server lose connection, the EA sends SMS warning message to 1 phone number Magic number: We need ability to change magic number input ourself. EA must restart: If the EA if closed and restarted in the middle of its work, it must remember its work and continue like normal when turned on again (in case of restart the server). This is critical. Input names: Please use the input names provided in the Spec Doc. Max DD close all positions (Max_DD_Percent): If max draw down is reached e.g. 20% DD, close all positions and stop the ea. Max DD is based on the percent of the highest equity reached. So if highest equity is $100,000 and input is 20, if equity reaches $80,000, stop the ea. Start lot is calculated as % of current equity. (need input Start_Lot_Percent_Equity). Eg $100,000 equity. If Start_Lot_Percent_Eqty = 1%, then start lot will be 1.0 lot size. If set Start_Lot_Percent_Eqty input = 0.25% Then start lot will be 0.25 lot, assuming $100,000 account. Must be able to use 0.01% on $100,000 account size to enable smallest start lot of 0.01 lot. We don’t increase lot size after losses. We calculate off the current equity. Need inputs: SL (use Close By function, but give me “SL” input name) TP, SL, Trailing And Move to Break Even (B/E) Move_To_Break_Even_Pips (if set to 15 pips, when we have 15 pips profit, the SL moves to the price where the position was opened plus the spread. If SL is hit, we lose nothing) See example below. It explains trailing the SL and can be combined with Move to Break even or not. Also Move to break even can be used by itself without trailing the SL. Example to explain logic: TP = 20 SL = 20 BUY order is entered at 1.3000. TP is at 1.3020 SL is at 1.2980 Market price moves to 1.3001. 1. Input: Pips_Profit_Start_Trail = 1 Start Trailing at 1.3001 2. Input: Trail_Distance (modify SL to this distance from the market price, after we start to trail) = 10 when market price gets to 1.3001, SL modifies from 1.2980 to 1.2991 3. Input: Trail_Step (we modify the trailing stop in these increments after we start to trail.) = 3 Market price moves up to 1.3002, SL remains at 1.2991 Market price moves up to 1.3003, SL remains at 1.2991 Market price moves up to 1.3004, SL modifies to 1.2994 Market price moves up to 1.3005, SL remains at 1.2994 Market price moves up to 1.3006, SL remains at 1.2994 Market price moves up to 1.3007, SL modifies to 1.2997 4. Input: Use_Move_to_B/E = True 5. Input: Move_To_B/E_At_Profit = 9 Market price moves up to 1.3008, SL remains at 1.2997 Market price moves up to 1.3009, SL moves to B/E at 1.3000 (Move to B/E) Market price moves up to 1.3010, SL remains at 1.3000 Market price moves up to 1.3011, SL remains at 1.3000 Market price moves up to 1.3012, SL modifies to 1.3002 Market price moves up to 1.3013, SL remains at 1.3002 Market price moves up to 1.3014, SL remains at 1.3002 Market price moves up to 1.3015, SL modifies to 1.3005 and so on... At 1.3020 TP is reached. If the inputs for trailing SL = 0, then we don't use trailing. If Use Move To B/E = false, we don't use move to B/E. Note: If we use multiple order parts, each order part works by itself, individually, with move to break even, trailing, etc. Display Info on the chart please show: All input settings with input names on LHS. Everything below is on RHS. Current Free margin. And lowest free margin ever reached. Total profits $ and total losses $ Longest number of days passed to reach new high equity. Max_Spread = e.g. 1.5 If spread is 1.6 or higher, we do not enter order.