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
Hi everyone. I have working (searching the forum) the last few weeks and managed to pull together an EA that does not compile errors any more but the structure of it is all wrong and because is not executing at the proper times. I was hoping some kind soul could take a look and help me to restructure my EA and maybe give some explanation of the changes. Thanks in advance for any help, I will pass it on as I learn.
Here is what I am trying to accomplish with my EA:
I have these extern inputs:
Lots=0.03;
Target_In_Dollars=5; This is the target where that I shoot for on the pair with all open orders (max 3) that tells the trailing stop to kick
Trailing_Stop=50;
Max_Orders=3;
Closed_Bars=0;
Distance_Back=24;
ADX=75; The trade will not open if 8period ADX is above 75
extern int Magic=717171;
Here is what is "supposed" to happen.... When a bar closes the EA check back 24 bars to for the signal, if its a go (signal is met and ADX < 75 and not exceeds max orders per) it opens the order of .03 lots at the ask price (no SL or TP at the time of order). When the total price of all open orders on that chart with same magic number (717171) total $5 or greater it is supposed to then modify all open orders on that chart with that magic number with the trailing stop.
While there are no "errors" the EA does not function quite like explained. I'm sure it's based on the structure and parentheses etc...
Thanks in advance for anyone taking the time to hold my hand this one time. Here is the code: