Hi,
Thank you for the indicator, Im new to coding and i t's easier to learn from programs like this one.
Just one question, Im sorry if it's a silly one, its just I can't get with the way to delete them once I place them in the chart. I can't select them with double click
on them, neither they show up in the objects list in mt5.
Could you help me with this?
Hi,
Thank you for the indicator, Im new to coding and i t's easier to learn from programs like this one.
Just one question, Im sorry if it's a silly one, its just I can't get with the way to delete them once I place them in the chart. I can't select them with double click
on them, neither they show up in the objects list in mt5.
Could you help me with this?
Thanks, I really don't know. I wrote the for MT4. I'm surprised it works on MT5.
//+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { // Enable the mouse track ChartSetInteger(ChartID(),CHART_EVENT_MOUSE_MOVE,true); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam) { static int previous_x=0,previous_y=0; static datetime last_time=0; static double last_price=0.0; // When the mouse moves if(id==CHARTEVENT_MOUSE_MOVE){ // Grab the x y int x=(int)lparam,y=(int)dparam; // If the x or the y are different you are interested if(x!=previous_x||y!=previous_y){ // You need to get the time and price where the mouse is pointing at double price; datetime time; int sub_window; if(ChartXYToTimePrice(ChartID(),x,y,sub_window,time,price)){ // Store the last known good values last_time=time; last_price=price; } // Update the previous x and y previous_x=x; previous_y=y; } } if (id == CHARTEVENT_KEYDOWN) { int wingdingCode = 0; // Variable to store the chosen Wingding code // Determine which key was pressed and set the corresponding Wingding code switch(lparam) { case '1': wingdingCode = wingding1; break; case '2': wingdingCode = wingding2; break; case '3': wingdingCode = wingding3; break; case '4': wingdingCode = wingding4; break; case '5': wingdingCode = wingding5; break; } // If a valid key was pressed, draw the Wingding if (wingdingCode != 0 && last_time != 0) { // Create a unique name for the object to avoid conflicts string objectName = "Wingding_" + IntegerToString(GetTickCount()); // Draw the Wingding symbol at the last known mouse chart position ObjectCreate(0, objectName, OBJ_ARROW, 0, last_time, last_price); ObjectSetInteger(0, objectName, OBJPROP_ARROWCODE, wingdingCode); ObjectSetInteger(0, objectName, OBJPROP_COLOR, symbolColor); ObjectSetInteger(0, objectName, OBJPROP_WIDTH, symbolSize); } } } //+------------------------------------------------------------------+
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I was searching and couldn't find, so here's my version.
Simply move mouse where you want wingding and press 1-5. It will create the wingding at mouse location. Good for quickly marking up charts.