Need help creating a VERY simple EA - page 4

 
doshur:

oops.

i forget to disable once it enters.

let me amend the code

hmmm - would you take a sell after a profitable buy or vice versa in the same bar? or once you have one trade would that be it for that bar?

 
no. once it pays out that is it. you will hv to wait for the current candle to finish forming your new range.
 

updated the code already

Pls test this version

 
Doshur - also working on your code - how about modifying the tp to allow for slippage and crazfoto, what do you do about slippage? Do you take the price whatever? In which case need to increase slippage in the code.
 
andydoc:
Doshur - also working on your code - how about modifying the tp to allow for slippage and crazfoto, what do you do about slippage? Do you take the price whatever? In which case need to increase slippage in the code.

the TP is always the buy/sell price + 5 pips (i think even got slippage also the same)

 
crazfoto:
no. once it pays out that is it. you will hv to wait for the current candle to finish forming your new range.

Hi crazfoto

how accurate can this strategy be? although i programme it, but yet to test it.

 
remove one more bug
Files:
stepper_1.mq4  3 kb
 

Should the Stops be a few pips above/below PrevHigh & PrevLow...?

Perhaps add GapPips as an extern, and backtest values 2-12..?

-BB-

 

i will be playing with it today. one way i plan on using it is when the eurusd week is trending down, i put it on the 4hr chart and only allow it to go short for 20 pips. i think it will work for any currency, you just have to find the right time and direction to have it trade.


another EA, if you feel up to it, you can try to write is this:


everyday at 6pm eastern the eurusd drops 10-20+ pips and the gbpusd drops 10-60+ pips. the stop is 10 pips above the previous 1hr candle.

 
i will be heading to program my new neural network EA for next year ATC