
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
oops. i haven't noticed that u made a change and replacement in the code above i remembered SwingValue[0]
try
i'm not sure & didn't testedzzuegg don't bother to backtest it because you don't have the file "ATR MA"
If anyone wants it, here's the ATR MA indicator. It's a very simple custom I made, of the ATR plus two of its moving averages. The histogram shows the difference between the first and second MAs. I find it very useful for day trading, provides an easy way of detecting when the market has begun to accelerate...
qjol, thanks for the suggestion, but that didn't work either =\
If you wanted to code the condition "buy when price crosses X line and sell when it crosses Y", how would you do it? I mean... this seems like an extremely simple thing to put into MQL4, it's strange that I'm having such a hard time with it.
i think
not tested
After staring at the screen for hours, I adopted a convoluted work-around, which seems to have put a band-aid on the problem.
Instead of using Bid and Ask, I use the two 1-period SMAs, applied to High/Low; when they cross the swing level, Buy/Sell signals are triggered:
But now the EA isn't modifying the orders with SL/TP correctly, so all it's doing is placing one order and and then closing it when the testing period is finished.
Can't things just work properly, the first time around?! =(
Scroll down to the next section. I have an ECN broker so I can't pass SL/TP with the order.
^-- The order modifying section from one of ubzen's EAs =)... not technically OrderModify()