bool IsNewBar(){ static datetime previousTime = 0; datetime currentTime = iTime(_Symbol,PERIOD_CURRENT,0); if(previousTime != currentTime){ previousTime = currentTime; } return false; }
You don't understand what you are writing. Is it a chatGPT EA ?
- thecerealslayer: why do you think is going on here?
Your code is broken.
Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
Code debugging - Developing programs - MetaEditor Help
Error Handling and Logging in MQL5 - MQL5 Articles (2015)
Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010) -
if(CopyBuffer(handle,0,1,2,bufferMain)!=2){ if(CopyBuffer(handle,1,1,2,bufferSignal)!=2){
Don't hard code constants, use the proper symbols. See the example iStochastic - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
-
Your code is broken.
Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
Code debugging - Developing programs - MetaEditor Help
Error Handling and Logging in MQL5 - MQL5 Articles (2015)
Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010) - Don't hard code constants, use the proper symbols. See the example iStochastic - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
You don't understand what you are writing. Is it a chatGPT EA ? No, I followed the video, however i personally dont see whats wrong with it, could you explain deeper?
-
Your code is broken.
Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
Code debugging - Developing programs - MetaEditor Help
Error Handling and Logging in MQL5 - MQL5 Articles (2015)
Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010) - Don't hard code constants, use the proper symbols. See the example iStochastic - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Hey when you say dont hard code constants do you mean i should be using a variable instead? Also i am using the istochastic function on the oninit area, am i doing that wrong?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey, im following this guys tutorial and my code is not generating any buy signals or print statements saying that i should buy or sell even though i can clearly see that criteria is met. why do you think is going on here? I followed the guys code to the letter i believe.
video: https://www.youtube.com/watch?v=YIqh72BxXik