@l-andorrĂ Thanks again for the help. I think I got it working. May not be the prettiest but seems to work in back tester as I wanted. Now will try on demo account.
Posts made by spyderman
-
RE: Please help with glitch in trend following EAposted in Questions & Answers
-
RE: Please help with glitch in trend following EAposted in Questions & Answers
Okay, thanks. That makes sense. I've tried to do that before and can't seem to figure out the variable thing. I'll have to look for some tutorials.
-
Please help with glitch in trend following EAposted in Questions & Answers
So trying to place a buy or sell when market moves 10 pips either way. s/l is 10 pips with no t/p. EA moves all trades to BE when they profit 10 pips.
So idea is that as market moves up there's a new buy every 10 pips with only the last trade having risk. If price moves the other way then a sell is placed. I've got the EA looking at the last trade to see if it's moved 10 pips. Works great on one direction. But when market reverses it doesn't take opposite trade.I believe it's because as the market reverses it takes out the last trade (a buy in this case) and so it can't grab that open price as the baseline for the 10 pip move down. So it reverts to the next open trade (which is 10 pips lower). And so from it's perspective, it never gets 10 pips below the "last" trade.
How would I have the EA select the open price for the last position opened., whether it's closed now or not.Here's the blocks and thank you so much: https://fxdreema.com/shared/TfLAy6w0e
-
Array out of range error on gridposted in Questions & Answers
Hello,
I'm trying to make an EA that will basically open a position with every time the market moves "n" pips. Let's say 10. 10 pip stoploss. If market moves 10 pips the EA will move the previous order to BE and open a new position in that direction with a 10 pip s/l. So only one position will be open with a 10 pip risk at a time. All other positions would be at BE until market conditions take them out.My problems are probably many but the immediate one is I'm getting an out of array on the "open price" which I'm trying to call up to establish my 10 pip move.
Here's the link: https://fxdreema.com/shared/Ea7prYTPb
I appreciate any help with the error or changes to accomplish my goal.
-
RE: Can't get user defined inputs to work!posted in Questions & Answers
@jstap Yes that was one of them. I'll try that. The stochastic settings also didn't seem to modify.
-
Can't get user defined inputs to work!posted in Questions & Answers
I'm trying to write a trade management EA to close open trades at cross of stochastic main/signal line. Input box pops up when EA is initiated but the inputs do not seem to change the function. The current chart seems to override inputs.
Thanks in advance for any help
1_1640111787685_Stochastic close mtf.mq4 0_1640111787684_Stochastic close mtf.ex4