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
OK, I give up. I have been trying to convert an established EA (bagovino, originally emacross) to use three xpMA's of your choice but it is beyond my ability. I have went through it and changed everything I thought needed changing and have it down to about 10 errors and just cant get it worked out.
It has most of everything I want in it. The EMA Angle could be removed, the 4th EMA could be removed. Might as well keep the RSI filter, may be useful.
I havent gotten as far as putting an exit strategy into it, and probabally couldnt if I wanted to LOL. Anyway a closecondition on MA 1, or 2, or 3 will be needed.
It would be nice to make it like the original xpMAEA to use only one MA along with the option 2 or 3, but I will take what I can get.
If a generous coder could PLEASE take a look at it an at least fix it so it works as I have outlined I would be forever grateful. I tried my best but just cant get it.
(I havent changed the copyright's or credits or whatever, credit is due to them all)
it compiles
I spent some spare time whacking in your file until it compiled. A comma here, remove a brace there, etc, and I suppose, severe re-indentation and added whitespace (my eyes are no less old than the rest :-))
hope it helps.
Thanks Ralph. Still a no go though. It ran but wouldn't put up any indicators even. I will have a look at it later and pull out some more hair. looks like the signal from xpma will have to be changed as well to give a 1 or -1 without the 0 buffer for this to work.
Does xpMA Repaint the Past.
This indicator looks to good to be true. I ran across other indicators that did something similar.
Nice indicator, if it doesn't repaint the past.
Can anyone confirm this?
This indicator looks to good to be true. I ran across other indicators that did something similar.
Nice indicator, if it doesn't repaint the past.
Can anyone confirm this?It does not.
XP MOVING AVERAGE Version 10 (Beta version)
Upon a request from one of my friends (Accrete) I made these modifications to xpMA bt didn't test them yet!
------------------------------------
Accrete,
This is the requested modifications!
Alerts you when the price crosses up/down the moving average line.
[php]bool AlertOnPriceRange = true;
double PriceRangeUpper = 0.0;
double PriceRangeLower = 0.0;Alerts you when the price enters the range - set the upper and lower boundaries.
NICE!
At first I assumed that xpMA changed colour when price broke through the MA line but now I see that this isn't correct. Then I looked again and could see that the MA line changes to yellow after price breaks through the MA line and then an arrow is drawn if the next bar again closes through the MA in the same direction but this doesn't appear to be the case either. So how does xpMA work? What's it looking for and what is the criteria which draws the arrows?
Got it (Sort of)!
- When the previous value of the MA is > the current value change the color to RED
- When the previous value of the MA is < the current value change the color to BLUE
- When the previous value of the MA is = the current value change the color to YELLOW
- Arrow displayed when colour changes to YELLOW
Upon a request from one of my friends (Accrete) I made these modifications to xpMA bt didn't test them yet!
------------------------------------
Accrete,
This is the requested modifications!
Alerts you when the price crosses up/down the moving average line.
[php]bool AlertOnPriceRange = true;
double PriceRangeUpper = 0.0;
double PriceRangeLower = 0.0;CodersGuru,
I really love your XPMA EA (and thanks for the above changes), but have the same concerns as CEO above where he states, "I really need it to send a signal every bar close because sometimes it will get in a sell and immediately reverse and the EA will not close the sell and buy, but I dont know enough about MQl to do this."
I have come to the same conclusion with my backtesting of this EA using the ATM_XPMA indicator. When this happens you only get your entry closed when it is finally stopped out with the SL in the opposite direction.
When the EA looks at the ATM_XPMA indicator and it turns to yellow, then red or blue, it triggers the entry/exit immediately. By the time the bar closes the color can change back to the previous color (let's say blue), while during the bar it signals red. Unless my thinking is flawed I believe the EA would be more profitable if the entry/exit triggers were generated at close of bar or it would be nice to at least have the option to do this. If you look at an ATM_ XPMA indicator line there are times that the line is continuously blue or red and there are false signals generated which take you out of a trade prematurely or enter you into one in the wrong direction. Would it be possible to code this as a selectable parameter?; such as, "Do not enter/exit position unless color confirmed on bar close" It would function as follows:
For example, you are in an up trend with a buy position in place and the indicator line is blue. A down spike in the current bar signals yellow and then red, triggering the buy exit and a sell entry. The bar then retraces back and closes back to blue and the up trend continues. You lost your buy position and you are holding a sell position in a continuing uptrend. You are then stopped out with your SL.
My thinking is that if your position was dependent on the close of the bar that this would be more indicative of the trend, while helping to eliminate some of the false entries and early exits. In the example above, if the close of bar was red, then the trend may be reversing and the sell position would have a better chance. Any help you could lend on this coding would be appreciated. I will also PM this to you.
Trader1