You have two options:
- Comment() which will disappear if the chart is closed or overwritten by another Comment() Comment(amr);
- Place a TextLabel (=Object) in one of the 4 corners, which can be deleted via the chart's Object-List.
Hi Calli,
Thanks for your message.
Sorry, a bit of a beginner here. Can you perhaps elaborate?
Are you saying in (1) above that if there is more than one Comment() in the code then it can interfere with the other?
There are other Comment()'s which I can show you if that will help.
Thanks,
Brian
Does your code actually call the Comment() function? I do not see it on the code you posted.
Comments work with newline characters.
Does your code actually call the Comment() function? I do not see it on the code you posted.
Comments work with newline characters.
Hi Enrico.
Thanks for your message.
Can you perhaps give me an example of how to call a Comment() function using my code above.
Do I need to put something in the brackets on this line?
DoComment(); //////////////////////////////////////I added this line and defined it below
Thanks again,
Hi Enrico.
Thanks for your message.
Can you perhaps give me an example of how to call a Comment() function using my code above.
Do I need to put something in the brackets on this line?
Thanks again,
Hi Enrico,
I think I figured it out.
Comment(amr);
Will let you know if I have more questions. Thanks for your help.
Brian
Oh no.
The comment is working but the EA is still not loading?
Let me play around a bit and see what I can figure out:)
Regards,
Brian
Oh no.
The comment is working but the EA is still not loading?
Let me play around a bit and see what I can figure out:)
Regards,
Brian
Not sure exactly about that problem, but my guess is that:
RemoveExpert = true
removes the EA from the chart when some conditions are not met. You saw the comments, so that means that EA processed at least one tick.
Not sure exactly about that problem, but my guess is that:
removes the EA from the chart when some conditions are not met. You saw the comments, so that means that EA processed at least one tick.
Thanks Enrico - I will look at that.
Regards,
Brian
you can use something like this to print stuff on the chart.
void topPrint(string text,int x, int y, string suffix) { ObjectCreate("O_"+suffix, OBJ_LABEL, 0, 0, 0); ObjectSetText("O_"+suffix,text, 12, "Verdana", clrPurple); ObjectSet("O_"+suffix, OBJPROP_CORNER, 0); ObjectSet("O_"+suffix, OBJPROP_XDISTANCE, x); ObjectSet("O_"+suffix, OBJPROP_YDISTANCE, y); }topPrint("this purple message will be placed in the top left corner at 20px distance from the corner",20,20,"unique_name");
you can use something like this to print stuff on the chart.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am learning by taking parts of old EA's I have had programmed and piecing them together in new EA's.
I have an EA that uses an account number and expiry date for validation. The code below works fine and the EA runs perfectly.
I am now trying to print comments relating to the account number and expiry date as shown in the next piece of code below.
The EA compiles without errors but when I try run the EA after adding this second bit of code, it will not take. i.e. the EA doesn't start at all.
I apologise for such a long piece of code but would appreciate any help.
Thanks.
Regards,
Brian