Help creating EA

 

Hello coders--

I am hoping to create an EA from the indicator attached. I had some luck with my first EA but this one is more complicated for me. For the purpose of speedier backtesting I want to code the EA to buy when a candle on the indicator breaks below -8 level and sell when it breaks above +8 level and i would like to include an adjustable sl and tp. That's it.

The first problem i ran into is- it is unclear to me how to tell the EA when the desired levels(+8, -8) on the indicator have been breached. If I can get some help with this part and perhaps a template to work with maybe I can take it from there.

Coders here are so awesome and helpful. I look forward to input from the gurus and furthering my understanding of coding.

Thanks in advance for any and all input

Files:
timing2.mq4  4 kb
 

I made EA for your strategy, however Timing2 indicator shows some error while backtesting:

"Timing2 EURUSD,H1: unknown subwindow number -1 for ObjectCreate function".

You would need to fix this indicator in order to use in EA. When when indicator is fixed this EA should work.

Files:
timing2_ea.ex4  60 kb
 

Help creating an EA

Hello,

I am wanting help in turning the attached indicator into an EA.

- Buy when indicator shows buy.

- Sell when indicator shows sell.

- To work on 1H time.

- Stop loss for buy: Low of previous hour plus 10pips.

- Stop loss for sell: High of previous hour plus 10pips.

- Close on buy: When sell indicator is signalled.

- Close on sell: When buy indicator is signalled.

- Automatic buy to sell order. So for example when the buy order is cancelled as a result of the sell instruction it sets up a sell order automatically.

- Money management: 5%

Does any one have instructions or the code to do this as I am new to coding EAs.

Cheers,

Files:
 
EACreator:
I made EA for your strategy, however Timing2 indicator shows some error while backtesting:

"Timing2 EURUSD,H1: unknown subwindow number -1 for ObjectCreate function".

You would need to fix this indicator in order to use in EA. When when indicator is fixed this EA should work.

Hi- Thanks for your input. Do you have a decompiled or mq4 file for this ea? Can't do any modification to the ex4 file.

 
EACreator:
I made EA for your strategy, however Timing2 indicator shows some error while backtesting:

"Timing2 EURUSD,H1: unknown subwindow number -1 for ObjectCreate function".

You would need to fix this indicator in order to use in EA. When when indicator is fixed this EA should work.

The EA you posted is working fine for me. I've seen that error before but am not sure what causes it. Have you tried reloading the EA? For my use the rules need to be changed from "bar close" to "every tick". Entries could be much better. Since i am testing it as a scalping tool I need the best entry possible. Beats nothing though and it is a start. Thanks again for posting it.

Now if we can just get it converted back to mq4. Anyone out there with a decompiler?

 
 

Thanks for the link ND. As a newbie this has been very enlightening.

 

Further observations

EACreator:
I made EA for your strategy, however Timing2 indicator shows some error while backtesting:

"Timing2 EURUSD,H1: unknown subwindow number -1 for ObjectCreate function".

You would need to fix this indicator in order to use in EA. When when indicator is fixed this EA should work.

There appears to be a problem with the indicator coded into the EA. If you run a visual test you can see that once you get the error and stop the visual test the indicator shows up on the chart without the 8,-8 4,-4 levels. The reason it was working for me is because I wanted to see the indicator as I was doing the visual test. So, as soon as the visual test started rolling I paused it and attached my timing indicator to the chart and re- started the visual test with a properly working indicator attached to the chart that I could observe as the test was running.

So until the EA is decompiled for modification, so that we can address these issues you can just attach a working timing indicator to a visual test chart and it will work perfectly. But, I warn you, visual testing of this strategy is extremely slow for some reason. It takes several hours to run a month long test. Maybe a helpful coder can help to understand why this is.

This EA has a lot potential. It takes hits through trending markets but a simple filter such as a moving average could help it along through the trends and increase it's win rate.

We really need to get this EA de-compiled or re-written.

 

Got It De-compiled

Attached is the de-compiled "timing2" EA(the code has too many characters to post). Unfortunately I cannot make heads or tails out of it. It does not resemble code that I have worked with before. I am hoping a coder can point me to the problem areas. The problems are...

1) the indicator attached may not be working properly. Attempting to test the EA gives an "object create function" error. When i attach a known working indicator to a visual test chart the EA works properly but takes forever to run backtests.

2)the rules need to be changed from "on bar close" to "every tick"

3)can someone help me understand the buy, sell parameters? It is suppose to buy on a breach of the -8 level and sell on a breach of the +8 level, which it does, but I don't understand from the code what represents those 2 levels. Where does it tell it to buy at -8 and sell at +8 and what characters is it using to represent those 2 levels and what is being used to represent the current value?

Once issues 1 ans 2 are fixed then we will have an EA that, on the right pairs and tf's, has a high win rate. But, with a trend filter and some extra rules it could be even better. Best case scenario would be a trend filter that looks to the 4 hr time frame and tells the EA if the trend is up, down, or sideways. Then, separate rules can be set for the EA to trade in each of these 3 conditions.

If a coder can just point me in the right direction i will do what i can.

Files:
timing2ea.mq4  50 kb
 

Anyone????

 

"News One Click Trader" Who willing to code this idea up? Here is the algorithm.

Hello Guys,

Following my readings about news trading and common feedback from news traders I came up with an idea which I hope some one might be able to code for the community.

What the indicator/EA will do:

  1. Read the calendar news as upcoming today, tomorrow etc...
  2. Add "Buy/Sell" button on all open pairs I have currently on my MT4
  3. Upon new calendar event the EA will read its: A. Previous price, 2. Forecast Price 3. Wait for the actual price
  4. EA will automatically create pending order based on the forecast and execute the trade right on the news release UNLESS actual price worse then forecast price, if the actual price worse then forecast price EA will remove the pending order
  5. The EA will also allow manual news trading by "light up" the right buy/sell button for me which once it got light up I can click on it and it will execute for me the order.
  6. To light either buy or sell button it will use the actual price and reflect all open pairs that affected as such if the news are 3 bulls GBP Prev price lower then actual price then if I am watching GBP/USD my BUY button will light up for me.
  7. In the settings I will be able to choose auto or manual, pending orders or market execution, SL/TP per each new order, how many bulls (importance level) I want trade 1,2,3 or 2 and 3.
  8. The EA will advice and trade only currently open charts/pairs I have.
  9. EA will email me about any pending order it puts on list so i can intervene if needed and stop it before execution.

Thoughts? some one ready take the project guys?

Thank you so much!

Reason: