You don't have to include anything if you just add the code at the bottom.
#property strict #property indicator_chart_window #include <Controls/Button.mqh> CButton SLTP1; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping SLTP1.Create(0,"SLTP1",0,440,45,575,25); SLTP1.Text("use KS close stop."); SLTP1.FontSize(8); SLTP1.Color(clrBlack); SLTP1.ColorBackground(clrBeige); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+
You don't have to include anything if you just add the code at the bottom.
I don't get which bit of code you're referring to?
I want all buttons to show at once
- www.mql5.com
I know how the freelance section works thanks, and I've used it multiple times. But not sure how that helps me learn to solve the problem myself...
Then you could also tell us how you solved it.
Maybe someone who has a similar issue will hit this page by search engine in the future.
And he will wonder how you solved it.
- www.mql5.com
#include <Controls/Button.mqh>
You shouldn't be using controls/button for on-chart buttons because those are meant to be added to CAppDialog. Instead use CChartObjectButton from the chartobjects lib.
There isn't any problem with it.
If you do not want to use libraries then you don't have to.
You shouldn't be using controls/button for on-chart buttons because those are meant to be added to CAppDialog. Instead use CChartObjectButton from the chartobjects lib.
Would this solve the text limit problem? At the moment I need two buttons for one line...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Currently to show the text I want, I need to make 2 buttons as there's a limit on the length in a button (as far as I know).
When I put another "#include <..." in, and then put the rest of the code for the next button, it doesn't work.
As I need 4 lines of similar length, I currently need 8 indicators...Surely there's a way to put all of them in one indicator? If so, can someone help?