Help with coding strategy into EA

 

I am constantly impressed by how helpful and friendly the forex trading community is. Hopefully someone will help me.

I would appreciate your coding help. Here is my strategy that I want coded into an EA. It is a simple inside bar (harami candle) strategy that looks for inside bars but only within 5 price patterns. I hope this is clearly explained:

Setup #1 -- Fib Retracement Buy

--find swing low and swing high to measure Fib retracement level (for example on 4HR chart)

--wait for inside bar (high and low fall within high and low of previous bar) to form at Fib level

--look for stochastic(8,3,3) cross to upside to confirm

--enter 1 pip above high of inside bar

--if no stochastic confirmation, look for confirmation on next faster time frame (for example on 1HR chart)

--if stochastic confirms, enter 1 pip above high of inside bar (on 4HR chart)

--when buy order is filled, place sell-stop-limit order 1 pip below outside bar (bar before inside bar)

--opposite instructions for Retracement Sell

Setup #2 -- Support/Resistance Buy

-- look for market to make new swing high above a level that used to be resistance and then look for it to retrace back to this previous resistance level

--wait for inside bar

--look for stochastic(8,3,3) cross to upside to confirm

--enter 1 pip above high of inside bar

--if no stochastic confirmation, look for confirmation on next faster time frame

--if stochastic confirms, enter 1 pip above high of inside bar

--when buy order is filled, place sell stop limit order 1 pip below outside bar (bar before inside bar)

--opposite instructions for Support/Resistance Sell

Setup #3 -- Double-Bottom Buy

--look for market to test a previous swing low

--wait for inside bar

--look for stochastic(8,3,3) cross to upside to confirm

--enter 1 pip above high of inside bar

--if no stochastic confirmation, look for confirmation on next faster time frame

--if stochastic confirms, enter 1 pip above high of inside bar

--when buy order is filled, place sell stop limit order 1 pip below outside bar (bar before inside bar)

--opposite instructions for Double-Top Sell

Setup #4 -- Convergence Buy

--look for market to make a lower low and for stochastics to make a higher low

--wait for inside bar

--look for stochastic(8,3,3) cross to upside to confirm

--enter 1 pip above high of inside bar

--if no stochastic confirmation, look for confirmation on next faster time frame

--if stochastic confirms, enter 1 pip above high of inside bar

--when buy order is filled, place sell stop limit order 1 pip below outside bar (bar before inside bar)

--opposite instructions for Divergence Sell

Setup #5 -- Momentum Buy

--look at 1, 5, 20 SMA plus stochastics

--want 1 SMA above 5 SMA above 20 SMA, and stochastic going up

--wait for inside bar

--enter 1 pip above high of inside bar

--when buy order is filled, place sell stop limit order 1 pip below outside bar (bar before inside bar)

--opposite instructions for Momentum Sell

--look at intraday and multiday Fib levels, if near 62% retracement level, do not trade

As soon as market moves up, implement 20 pip trailing stop.

If setup is one of top 4, make sure stochastic on next faster timeframe has crossed to upside and 1 SMA is above 5 SMA.

If get inside bar that does not fit into one of these setups, ignore it.

Thanks.

 

I'll try to help (coding training for free! woohoo!)

BUT! I need you to put explanations with real examples.

take any graph you like, make a screenshot, put ALL levels as well as formulas for calculating those levels on the picture and THEN I'll try to make an EA.

Otherwise its not a strategy.

By the way did you paper-test it? I mean did you try your own rules on history? I don't want to spend time writing an EA that wasn't supposed to be profitable.

I'll be happy to help you

 

I appreciate it. I will get back to you.

 
Shinigami:
I'll try to help (coding training for free! woohoo!)

BUT! I need you to put explanations with real examples.

take any graph you like, make a screenshot, put ALL levels as well as formulas for calculating those levels on the picture and THEN I'll try to make an EA.

Otherwise its not a strategy.

By the way did you paper-test it? I mean did you try your own rules on history? I don't want to spend time writing an EA that wasn't supposed to be profitable.

I'll be happy to help you

Hi, I hope I am not "hi-jacking" this thread, otherwise, I will delete it immediately.

Shinigami, maybe you can help code the strategy I have in mind too. It was posted here, https://www.mql5.com/en/forum/general.

Please look at post #4 for the rules, and post #19 for the samples.

I have been paper (back) testing this starting Jan 2007, and different major currencies, and it seems to work well on EURUSD, and mostly on BUY orders only.

Thank you.

 

I'll be looking at it but as I've posted elsewhere I'll be busy next 10 days.

Also could you please make a bit different definition of rules?

EAs work in this way: they do something at EXACT point so I'll need to know when (at exact moment with exact numbers) to open or close positions.

 

Thank you. I have just updated post #4, to include the sample entry and exit of trades posted in post #19, https://www.mql5.com/en/forum/general

Again, I think the rules of entry and exit is clearly laid out - no guesswork needed.

Kindly visit the thread, and tell me what you need to know, if you have the time sometime soon.

 

something is wrong with me today.....................

 

sorry wrong thread

 

...............................

Reason: