Consecutive Tick Counting, Simple EA Please do not start unless you understand everything very clearly! TP Input e.g. 15 SL Input e.g. 5 Lot Size input e.g. 0.01 Explanation of a TICK: 10 ticks = 1 pip on the EUR/USD. A TICK is the 5th digit after the decimal point. For example if the EUR/USD moves from 1.36543 to 1.36547 this is a 4 TICK move. 10 ticks in Forex equals 1 pip (applicable to Forex Majors). If EUR/USD moves from 1.36543 to 1.36563 this is equal to 2 pips (or 20 TICKS). input Minimum_Consecutive_Ticks e.g. = 35 input Maximum_Consecutive_Ticks e.g. = 50 So we are looking for the count of consecutive ticks to be between the minimum and the maximum values for entry of trade, as soon as opposite tick(s) condition met. Consecutive ticks up means the market went up e.g. 35 consecutive ticks (which is 3.5 pips on the EUR/USD) and had ZERO down tick. We need input for Opposite_Ticks_Stop_Count. = e.g. 1. Assume the condition for minimum and maximum consecutive up ticks is met. As soon as we have 1 opposite tick (down), we stop the consecutive up tick count and enter the buy order. Another example: If Opposite_Ticks_Stop_Count = e.g. 4, we only stop the consecutive up tick count when we reach 4 down ticks (down ticks to stop the count do not need to be consecutive, but they can be.). So in the example we can have 15 consecutive up ticks, 1 down tick, 10 consecutive up ticks, 1 down tick, 10 consecutive up ticks, 2 consecutive down ticks. We enter the buy order (because minimum 35 consecutive up ticks is met and 4 down ticks to stop count is met). Note that some of the opposite ticks to stop count were not consecutive and some were consecutive. In the above example, IF we do NOT have the minimum 35 consecutive up ticks but we do have 4 consecutive or non consecutive down ticks, we start the consecutive up tick count from the beginning again. NOTE: For consecutive down ticks we enter a sell. For consecutive up ticks we enter a buy. We always enter a trade in the SAME direction as the consecutive ticks. Please note this important point. Additional condition for trade. Time/Range. True/False Option: Example: minimum and maximum consecutive ticks condition is met. E.g. we have 35 consecutive up ticks. We have 4 opposite (down ticks). So we are ready to place the buy order. But we don’t place the buy order yet. Instead, immediately start a clock Wait_Seconds_For_Range = e.g. 5 seconds. During this 5 seconds the market price cannot retreat more than Max_Retreat_Ticks = e.g. 10 ticks and the it cannot advance more than Max_Advance_Ticks = e.g. 25 ticks. These are NOT consecutive ticks, but rather a price range. If the price is 1.31450 when we start the clock (condition for entry of buy order is met), it means that after 5 seconds the price cannot drop below 1.31440 and it cannot go above 1.31475. If the price is in this range after 5 seconds is up, now we enter the buy order. Count losses and stop trading: After SL is hit, we count losing trades and we stop trading if loss count is met. Count losing trades input: Count_Losing_Trades = e.g. 3. Count_Losing_Trades_in_Max_Seconds = e.g. 100 seconds. Winning trades and B/E trades we do not count. We do not count a trade until it is SL with a loss. As soon as we have SL we start the clock for Count_Losing_Trades_in_Max_Seconds. So if we have 3 losing trades within 20 seconds (20 seconds is less than the 100 second limit) then we stop trading for input Stop_Trade_Seconds = e.g.1000 seconds. After 1000 seconds, if trade condition is met, we trade again and count losing trades is reset back to zero. Max Spread: Input Max_Spread = e.g. 1.6 we do not trade if spread is 1.7 or above. Show on chart on LHS the input names and values. Show on chart on RHS the 1) counting of consecutive ticks, the counting of opposite ticks, 2) the clock running and price ranging, 3) the count of losing trades, counting clock to time limit, and clock counting for withholding trading.