Step Ma EA - page 13

 
jayjonbeach:
Have looked at code and have some additional questions to above.

StepMabartotest - If we put 2 here, does this mean EA will wait until current bar closes before opening trade (looks at last bar vs 2 bars back like original)? It looks like you opted to have the current bar compared to last as default correct? (which means repainting can be a factor)

BE pips and profit - is the BEpips the number of pips before a stop is even placed at BE? What is the profit setting for?

Time filter - I have never been clear about the whole GMT thing, how different Brokers are all different, and how to account for all these things etc. Most of my demo Brokers all seem to be 4 hours ahead, if I want the robot to start trading at 10pm does this mean I should put 2am as start time?

Gold - The bot I coded worked for Gold, will this one still work and all settings? (important for me)

----

You sure did a lot of work here, thanks very much!

Lots of testing to do here for sure, to which I'm sure I'll have more questions and things to report.

Cheers

Sorry two more

Time Filter- How do we set this so the bot trades 24 hours?

BE- in my first couple of backtests I don't think this is working for me, but maybe this is due to how the settings work?

In the backtest, for BEpips if I enter 40 for value, and 40 for start, automatically a STEP of 10 is added and STOP of 90?

What does this mean exactly, and how do we account for it if we want a BE stop put in place after 40 pips?

Thanks again!

 

stepma_v7 on 5m

Assuming, am running this ea on 1h or 30m, is there a way to have it not re enter a trade when the stepma has changed direction on a lower tf like 5min or 1min.

i observd that the number of times a trade hit sl is because the direction has changed on a lower tf yet like 5m or 1m

 
drunkpips:
Assuming, am running this ea on 1h or 30m, is there a way to have it not re enter a trade when the stepma has changed direction on a lower tf like 5min or 1min. i observd that the number of times a trade hit sl is because the direction has changed on a lower tf yet like 5m or 1m

Hi Drunkpips. This is a big double-edged sword you are talking about here, trading M30 but basing entries on M5.

It works great if you can enter M5 rules, and the trade becomes profitable, and you can "shift" it up to bigger and bigger TF like M30 or H1 in this instance, but it works terrible if your M5 entry starts LOSING, you do not want to exit a M5 entry on M30 if losing.

I hope you see what I am getting at here.

 
jayjonbeach:
Sorry two more

Time Filter- How do we set this so the bot trades 24 hours?

BE- in my first couple of backtests I don't think this is working for me, but maybe this is due to how the settings work?

In the backtest, for BEpips if I enter 40 for value, and 40 for start, automatically a STEP of 10 is added and STOP of 90?

What does this mean exactly, and how do we account for it if we want a BE stop put in place after 40 pips?

Thanks again!

Edit - okay after more testing, I believe I got the BE SL to work, however I don't think it itself is working correctly, and it is not kicking in at all the times it is supposed to (it only kicked in once, and in other spots when trade was ahead 40 pips the order was not modified)

After 40 pips in profit the order was modified one time, great, however it was modified to have a Stop Loss at the CURRENT price, rather than at the entry price +1 pip. So of course the trade hit the SL very shortly after.

----

I think my testing is finished for the moment. Good news is I think EA is working correctly for opening and closing orders, and I think Stepbartotest set at 2 means it waits until bar is closed? before executing? Edit, maybe not, I seen one instance where it sold and StepMa was not Red, so likely the current bar repainted after the bot sold.

Needs work is the TS and BE options as far as I see so far, did not try Gold yet, and if not too tricky the wishlist option from my "p.s" in prior post

 

not exactly

jayjonbeach:
Hi Drunkpips. This is a big double-edged sword you are talking about here, trading M30 but basing entries on M5.

It works great if you can enter M5 rules, and the trade becomes profitable, and you can "shift" it up to bigger and bigger TF like M30 or H1 in this instance, but it works terrible if your M5 entry starts LOSING, you do not want to exit a M5 entry on M30 if losing.

I hope you see what I am getting at here.

thats exactly not what i mean.

here is the idea:

assuming a buy trade is open based on 30m stepma, when the trade is closed or stopped out, ea should not open another trade except the stepma on the 1m/5m is in agreegment with the 30m in this case ,blue.

if the stepma on the 1m/5m is showing red(sell), the re-entry (which is buy in this instance) should be suspended till the 1m/5m stepma shows blue

dont know if am making sense though

 
jayjonbeach:
Edit - okay after more testing, I believe I got the BE SL to work, however I don't think it itself is working correctly, and it is not kicking in at all the times it is supposed to (it only kicked in once, and in other spots when trade was ahead 40 pips the order was not modified)

After 40 pips in profit the order was modified one time, great, however it was modified to have a Stop Loss at the CURRENT price, rather than at the entry price +1 pip. So of course the trade hit the SL very shortly after.

----

I think my testing is finished for the moment. Good news is I think EA is working correctly for opening and closing orders, and I think Stepbartotest set at 2 means it waits until bar is closed? before executing? Edit, maybe not, I seen one instance where it sold and StepMa was not Red, so likely the current bar repainted after the bot sold.

Needs work is the TS and BE options as far as I see so far, did not try Gold yet, and if not too tricky the wishlist option from my "p.s" in prior post

Hi Jayjonbeach,

If you want the Ea to trade 24hrs set start hour to 0 and end hour to 24, its based on server time. Stepbartotest needs to be 1 for first closed bar, if set on 2 then will not open or close trades until second closed bar. Also wasnt sure about either the trailing or BE working correctly, but posted it anyway so the main concept could be tested first. In visual back testing saw the same thing about Ea opening and color not changed but would rather see this in live trading than relying on back test.

 
mrtools:
Hi Jayjonbeach, If you want the Ea to trade 24hrs set start hour to 0 and end hour to 24, its based on server time. Stepbartotest needs to be 1 for first closed bar, if set on 2 then will not open or close trades until second closed bar. Also wasnt sure about either the trailing or BE working correctly, but posted it anyway so the main concept could be tested first. In visual back testing saw the same thing about Ea opening and color not changed but would rather see this in live trading than relying on back test.

Great thanks for those initial answers, I am trying to test live on M1 now but so far no trades, I think the time filter was holding it back, will fix it now.

I got it to trade Gold by lowering the risk to 0.00001, but the SL was not working in the backtest, that pesky 130 error (not sure what it is)

 
drunkpips:
thats exactly not what i mean.

here is the idea:

assuming a buy trade is open based on 30m stepma, when the trade is closed or stopped out, ea should not open another trade except the stepma on the 1m/5m is in agreegment with the 30m in this case ,blue.

if the stepma on the 1m/5m is showing red(sell), the re-entry (which is buy in this instance) should be suspended till the 1m/5m stepma shows blue

dont know if am making sense though

Ahhh, got ya, yes that is more clear.

This could be something we can try for a filter option, I'm just not sure if it will work as you intend.

The thing is, the price has to be moving in a positive direction on M30 in order to trigger a buy order (Step angle changes to up/blue) and in order for that to happen, everything lower than M30 also has to be moving up.

I think what you are seeing, is possibly what Mr. Tools and I are referring to, and as well, what I referred to before, where right after entering a trade, the price reverses. In the later case, there is not much you can do, the signal was given, and after that fact price on M1/M5 starts going the other way. Sometimes it won't go enough to trigger Step angle, sometimes it will, this is where a Stop Loss comes into play.

I will try and double check what you are saying you see, probably best checked on live trade situation.

 

please help

EA fail to start.

I do not understand what wrong?

The only changes are to:

Lots: 0.01 EURUSD, Silver 0.10, SP 500 1

Start Hour 0, Index minutes 1

End Hour 23 Minutes 1 end

I attach below the graphs when EA started after 12 hours.

Can someone help me to set it up and start?

Please!

Files:
 
gtudor:
EA fail to start.

I do not understand what wrong?

The only changes are to:

Lots: 0.01 EURUSD, Silver 0.10, SP 500 1

Start Hour 0, Index minutes 1

End Hour 23 Minutes 1 end

I attach below the graphs when EA started after 12 hours.

Can someone help me to set it up and start?

Please!

Gtudor,

If you don't mind me asking what broker are you using looking at your charts the EURUSD doesn't have any prefix or suffix before or after it, not sure about Silver and SP 500, Silver is covered in the Ea for magic number but SP 500 may help to change AutoMagic to false, other than that not sure.

ps) also something else make sure your broker allows micro mini(.01) lotsize.

Files:
Reason: