Job finished
Specification
User input
O.R start time
O.R end time
Avalue
Cvalue
Lot size
TP
EA requirements
User enters O.R start time and O.R end time.
EA checks highest and lowest price levels between O.R start and O.R end time. This time frame will be the O.R
Highest time will be Bup
Lowest time will be Bdown
EA adds Avalue to Bup and Bdown to give Aup and Adown respectively.
EA adds Cvalue to Aup and Adown to give Cup and Cdown respectively.
EA draws Bup, Bdown, Aup, Adown, Cup and Cdown (This is not an absolute requirement but would be nice to have)
EA monitors price levels continuously
If bid price gets to Aup or Adown and remains there for a duration equal to O.R/2, then enter buy or sell trade.
Example
For an O.R of 15 mins, if Aup is 1.2000, and price gets to 1.2001 at 12:15 pm, before making a trade, the closing price at 12:16pm, 12:17pm, 12:18pm, 12:19pm, 12:20pm, 12:21pm and 12:22pm must be greater than or equal to Aup. If this condition is satisfied, then EA initiates a buy trade. A similar principle will be used for the sell trade using Adown.
Close trade at TP (if trade is profitable).
Close trade at SL (if trade is not profitable). Note that for buy trade, the SL will be price at Bdown, and for sell trades, the SL will be price at Bup.
If trade is closed as a result of SL, then wait until price reaches Cup and Cdown in order to enter a buy trade or a sell trade.