Job finished
Specification
Ive an existing EA using bar open prices only written by a very good programmer so that it is highly efficient in back testing speed/passes(under 2 seconds for 10 years of 5 min bar open data) and I'm requiring some updates written with the same due care and style that the original programmer so that it retains its speed/efficiency. I will be working again with the same programmer in the future so I require him to approve of the way the updates are written, please review the code style/layout to be sure that you can replicate it prior to applying.
Updates required are as follows : (where Standard Deviation is mentioned, it is always same period as per the Bband input and thus does not require its own input)
1) add in an additional rule for valid entry trigger, being that the Standard Deviation (SD) must turn down after being in an upward state once the Bollinger Band has been breached to the upper/lower side
ie, 1st condition after tradezone open time is that price must breach the Bband to the lower or upper side, 2nd condition is that SD must be in a rising state, 3rd condition is that the SD must turn down for valid trigger.
2) add in a filter rule "BigBarRatio" = Trigger bar : Standard Deviation ratio maximum (ie if the Trigger Bar : SD ratio exceeds threshold, no trade)
3) add in a filter rule "MARatio" = Standard Deviation : distance from entry to Bband MA ratio minimum (ie if the distance from the entry is not at least a certain ratio of the SD then no trade)
4) add in filter rule "TrendRatio" = min ratio of previous days Open to Close/High to Low to determine trending market and enter on short signal in downtrend/long signal in uptrend (or else the EA is to consider it a sideways market and take both long and short entry triggers)
ie, if the previous days open close difference is 50 pips, and the previous days range is 100 pips = ratio 0.5. If set to 0.5 and the delta change is less than 0.5 then EA will consider it a sideways market and enter on both long and short signal. If greater than 0.5 and price has risen = uptrend (and vice versa)
5) add in a trailing Stop loss using a ratio of the Standard Deviation "TrailingStop" = X (ratio of the Standard Deviation). Trailing stop to only be adjusted at each new bar open.
6) Stop Loss to be changed from hard value to a ratio of the Standard Deviation
7) Take Profit to be changed from hard value to ratio of the Standard Deviation