Below code works perfectly after you helped me, thanks man.
And I renamed as you said, it works good, but just I am wondering, am I doing something wrong?( just I am Worry about )
Worrying whether your code will work is very normal (indeed it is healthy). Frequently we will see code that compiles but doesn't do what we want (because of human error and/or lack of knowledge).
The best way is to get into the habit of printing variables and checking return codes. Once you have tested, you can remove the print statements.
Using your code snippet above, you could add a simple Print("SL value: "+sl) and then check your Expert log to see if the values are what you expect.
#Checkmark - Closed
Yeah! I accept this bitmap label already took a long time from me. Finally, I got what I want...Of course, huge man, thanks for your help.
I solve my issue like below code.
The best way is to get into the habit of printing variables and checking return codes. Once you have tested, you can remove the print statements.Using your code snippet above, you could add a simple Print("SL value: "+sl) and then check your Expert log to see if the values are what you expect.
I already use it, but sometimes I doubt my code because if you check my #Checkmark issue, I hope you will understand me more clearly.Anyway thanks for your time.
Oh! Yeah man, good question, I already changed. Thanks for your attention.
#Stop Loss / Take Profit - Closed
Thanks for your more clearly comments Marco.All the best to you.
#Ctrl + Mouse Button - Open
I spent few hours, how can I find good documentation about that, and I can't got any good information and documentation for it.I just need when I click 'Left Mouse + Ctrl' for Lot size increase by 0.1. ( is normally increase by 0.01 ).
I want to find documentation and articles with example about that.
Thanks in advance.
I don't know of an easy way to trap key combinations. It would be better to have a second button to click if you want to increase by 0.1 rather than 0.01.
Nevertheless, you can try the following:
Check if the last event was a keystroke CTRL.
If it was, check if this event is a mouse click.
But, there are some problems with this approach:
1. If any other chart event happens between the keystroke and the mouse click, it fails.
2. You will get some overrun caused by the delay between the mouse click and releasing CTRL. The workarounds to this will introduce their own problems.
Perhaps some other people will have better ideas.
I guess so.
It's slightly different tho.