View Single Post
  #1 (permalink)  
Old 10-26-2006, 11:22 PM
Kaper Kaper is offline
Member
 
Join Date: Oct 2006
Posts: 33
Kaper is on a distinguished road
Anyone want to write a simple EA?

I have taken a few stabs at this EA but I guess I am not a programmer. What I am trying to write is a simple EA using just the stoch indicator with a 5,3,3 setting on close/close.

A buy is generated when the stoch value hits 0% and a sell is generated when the stoch value hits 100% on the daily chart. There is no stop loss instead a hedged position is taken when price goes 50 pips against the trade. Profit is taken at the other extreme. Only 1 buy and 1 sell can be open at the same time.

For example, a buy is generated on Oct 15th when stoch value hits 0% at 1.2550. On Oct 16th the stoch again hits 0% at 1.2531 but does not take a buy because there is already one buy postion. A few days later the stoch value hits 100% and the buy is closed and a sell position opened.

Lets say that in the above example that the price goes down to 1.2485 then a hedged sell position would have been opened at 1.25 (50 pips). These 2 positions will remain until the stoch value hits 100% at say 1.2710 and the buy is closed and only the sell remains which will be closed out when the stoch value hits 0% again. If the price would have continued up to say 1.2775 then a hedged buy would have been opened at 1.2760 (50 pips)and so on and so on.

I would like to be able to choose the number of lots and mini lots as I have mini account. I would also like to be able to close a trade manually without messing up the EA. Any other additions or enhancements feel free to add.

If anyone would like to tackle this I would appreciate it. Thanks.

Kevin
Reply With Quote