-
int init() ⋮ int deinit() ⋮ int start() ⋮ //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { CalculateLots(); //display lots on chart
Use the old or start using the new Event Handling Functions.
Event Handling Functions - Functions - Language Basics - MQL4 ReferenceDo not use both.
- Use the debugger or print out your variables, including _LastError and prices and . Do you really expect us to debug your code for you?
Your code double GetFractal(int mode) { double tempup=0, tempdn=0, fup=0, fdn=0; tempup = iFractals(Symbol(), 0, MODE_UPPER, LookBack); tempdn = iFractals(Symbol(), 0, MODE_LOWER, LookBack); if(tempup != 0) fup = tempup; if(tempdn != 0) fdn = tempdn; if ( fup != 0 && fdn == 0 && mode == MODE_UPPER ) return(fup); if ( fdn != 0 && fup == 0 && mode == MODE_LOWER ) return(fdn); return(0); }
Simplified double GetFractal(int mode) { double temp= iFractals(Symbol(), 0, mode, LookBack); return temp==EMPTYVALUE ? 0 : temp; }
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
Original code from here: https://www.forexfactory.com/showthread.php?t=325991
I fixed all the warnings in original ea but still it is not opening any trades.
Thank you for helping me in advance!