Kurka Trader - GREED

 

Here is my latest work in progress.

My intention is to enter a position when the bid/ask is "PipStart" above/below the previous bars HIGH/LOW. And add to the position when PipStart + PipStep is reached.

I use two indicators OSMA and ADX, which both must be True in order to enter in that direction.

Please take a look and let me know what you think....

Here is what needs to be done...

1. Limit number of trades to 5 per bar. Only one for each step. (There has got to be a more efficent way to do this than what I have done)

2. Get the trailing stop working. I used Etrailing, but am open to other suggestions. I would like to start the trailing stop after

a) the next bar is formed or

b) 10 pips

whichever comes first.

Could also be a simple protest profit Logic.

then since it is a scalper system It needs a very tight trail, which will have to be faked using OrderClose instead of OrderModify because a broker would not like a flurry of OrderModify every 2 pips.

3. LotSize. I would like to trade a % of the AccountFreeMargin, but Would also like all open trades to be the same size. I was thinking Risk * account free margin / Max Trades. But couldnot make it work..

4. News. I need to figure out how to attach the EA to a news feed and turn it off prior to a scheduled news event. ( I started another thread on this topic )

5. It would also be nice to add a Hedging function. Buy and sell on the same bar when bid/ask are "extreme pipstep" (say 10+ pips) away from the previous High or Low...

Any help is apprieciated....I am good at strategy but am still new to the whole EA programming thing...

Thanks.

KK

Files:
 

I am trying to figure out what you are trying to do here, the code doesn't seem to match your stated intention. Can you clarify the conditions of entering a buy? Currently you are entering at pipstart and pipstep intervals below the previous high. I was expecting it to be above the previous high?

 

I'm testing

Hi Kurka...

I'm testing this EA - what Time frame do you use? in what currencys?

Thanks...

Fernanda

 

I buy when the OSMA and ADX say buy, (this establishes the trend) and pipstart and pipstep are below the previous high. ( this indicates the price is at a short term low).

The intention is to buy low and sell high. If you backtest it you will see that trades turn positive almost imidatally because you are buying when price goes against the OSMA and ADX.

What needs to be worked on is protecting the profit as soon as it turns positive.

Might also work better if; instead of using the previous bars high you use the high from the previous 4 bars. then go pipStart and pipstep away from that. This idea is beyond my coding level...

tururo:
I am trying to figure out what you are trying to do here, the code doesn't seem to match your stated intention. Can you clarify the conditions of entering a buy? Currently you are entering at pipstart and pipstep intervals below the previous high. I was expecting it to be above the previous high?
 

Here is a picture that should help understand the theory...

Essentially the ADX establishes a buy or sell zone....

then its all price action, if in the buy zone the price falls below (pipstart) on the previous bar then it enters long, and again on every pipstep. and vice versa.

in the pic it is represented by the purple line. if you look closley ( I should have maginified ) every trade should have a positive result because you are buying low and selling high.

It just needs a really tight trailing stop as soon as it goes positive...

Files:
greed.jpg  104 kb
 
Kurka Fund:
Here is a picture that should help understand the theory...

Essentially the ADX establishes a buy or sell zone....

then its all price action, if in the buy zone the price falls below (pipstart) on the previous bar then it enters long, and again on every pipstep. and vice versa.

in the pic it is represented by the purple line. if you look closley ( I should have maginified ) every trade should have a positive result because you are buying low and selling high.

It just needs a really tight trailing stop as soon as it goes positive...

What TF and pairs is the best? In your attachment you are using TF M15 on euro. Only good in this TF?

 

Added SMA and check out these results

Here are the results for october trading 1 lot per trade....

 

And the results from October 1 through today

 

Need some help faking a tight trailing stop after the trade is in the black.... Brokers will not allow a 2 pip TS

Also need help with the number of trades and MM.... anyone interested?

 
Kurka Fund:
And the results from October 1 through today

Great result . Would you post your latest EA that using sma. Anyone alredy foward test this?

 
Kurka Fund:
Need some help faking a tight trailing stop after the trade is in the black.... Brokers will not allow a 2 pip TS Also need help with the number of trades and MM.... anyone interested?

I can do when I have the time. You posted a version but the results you display are from a different EA with SMA added. The above posted one doesn't test the same.

Reason: