fxalert:
Use Alt+S when posting code - It looks like a mess all of it!
Kenneth Parling:
Thanks, very constructive advice
Use Alt+S when posting code - It looks like a mess all of it!
fxalert:
Any suggestions or help gratefully appreciated as I want to display both outputs as comments on the chart screen eg 1st function & 2nd function out both displayed at the same time (sort of parallel running I guess??).
if ((Price_Check_4H)&&(MA_Check_4H)) Comment ("\n, 4H Trend in BUY Zone & BUY Signal"); else if ((Price_Check_4H)&&(!MA_Check_4H)) Comment ("\n 4H Trend in BUY Zone & Reversal Signal")
- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - Stop trying to use two Comment's. Output two strings in your functions and then combine in the parent
function.
string comment1, comment2; ⋮ func_1(){ comment1=/*Comment(\n, */"4H…";//); ⋮ func_2(){ comment2=/*Comment(\n, */"4H…";//); ⋮ OnInit(){ func_1(); func_2(); Comment(comment1,"\n", comment2);
William Roeder:
Appreciated, thank you. My 1st post so apologies for lack of ethics and ignorance of the rules. I will update/clean it up
- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - Stop trying to use two Comment's. Output two strings in your functions and then combine in the parent
function.
Maybe the solution in this thread (https://www.mql5.com/en/forum/323918#comment_13490816) helps you with your problem,
too.
Display several lines of Comments
- 2019.10.08
- www.mql5.com
Hi there, in have a Comment at the end of each module of the current code I'm working on, and I like to display each one below another...
Chris70:
Maybe the solution in this thread (https://www.mql5.com/en/forum/323918#comment_13490816) helps you with your problem, too.
Maybe the solution in this thread (https://www.mql5.com/en/forum/323918#comment_13490816) helps you with your problem, too.
Thank you very much for this link. I'm trying to wrap my head around it (I am a complete novice) but hopefully I can use this and the other suggestions from William Roeder to solve my problem - much appreciated, thank you both :)
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 - no idea what I am doing(complete novice), but I have managed to create an EA that uses 'if' and 'else if' logic to display output as a comment.
I have two functions running similar conditions, I am calling both functions in the OnTick function and only the last function display as a comment --> 1st function does run but stops or is cleared by the next function.
Any suggestions or help gratefully appreciated as I want to display both outputs as comments on the chart screen eg 1st function & 2nd function out both displayed at the same time (sort of parallel running I guess??).
my code is constructed as follows below (to keep the post short i have simplified the script content), and compiles without error
I have tried but failed to include all the logic into one function, hence multiple functions.
Thank you very much in advance :) as ideally, on the chart screen I want to see these comments:
Daily Trend in BUY Zone & BUY Signal"
4H Trend in BUY Zone & Reversal Signal