Hi guys, I have a couple of running trades on one instrument. Now I move the stoploss of one order closer to the current price by dragging the stoploss line in the chart. An EA should notice that and change all other stoplosses to the same stoploss
Hi coders, I have 10 objects in my chart. If I pop-up an alert with ObjectsTotal() the result is 10. When I want to color them all in green I do it this way: for ( int i= ObjectsTotal (); i> 0 ; i--) { ObjectSetInteger ( 0
Hi coders, is it somehow possible to delete the text in an OBJ_EDIT when clicking on it? I want to avoid a label as a description for that edit box and so I want to place the description right inside the edit box which should disappear when I click
Hey coders, I found a code about how to maximize a chart window by using SendMessage but I can't find something like WM_MDIMINIMIZE. I googled it but I didn't find a command to minimize a window. Can someone help me? This script is working fine to
Hi coders, if I have opened 20 charts I only want some calculations done on the chart I am currently watching. So it might be useful for an indicator to check if a chart is currently active. I found a solution here
Hey coders, sometimes I need a tick, may it be on a weekend or during quiet market times. I thought about forcing a tick by calling OnCalculate() from a chart event. This was my first idea: void OnChartEvent ( const int id
Hi coders, the H1 chart is open. Now I would like to have screenshots from H1, M15 and H4. I do it this way: ChartScreenShot ( 0 , _Symbol +( string ) _Period + ".png" , 1280 , 720 ); ChartSetSymbolPeriod ( 0 , NULL , PERIOD_H4 ); ChartScreenShot ( 0
Hello, right now I am checking all objects on each tick and if the object is a horizontal line starting with the keyword 'alert' and it is touched by the current price , it sends an alert to my smartphone. Works perfect so far. Now I sent it to a
Hi forum, I am using the following lotsize calculation: double moneyRisk = AccountBalance()*percentRisk* 0.01 ; double lotSize = moneyRisk / (entry-sl)*dir / (MarketInfo( NULL , MODE_TICKVALUE)/MarketInfo( NULL , MODE_TICKSIZE));
Hi forum, when I do some analysis on the weekend and I need a tick for an indicator to update some objects or whatever, I just open the indicator list and close it. Obviously that causes the OnCalculate() to run once. Then the indicators which need a
Hi forum, for me it's inconvinient to disable autoscroll before I can scroll backwards. So I thought if it is possible to disable it automatically if WindowFirstVisibleBar() is above a certain number. I use chart scale 4 with a shift on the right
Hello, I want my indicator to execute an order but I know that is only possible by a script or EA. I don't want to use an EA here and therefore the only possibility is to use a script and I read that the only method to execute a script from an
Hi forum, I want a vertical line to be drawn if I press (and hold) the s-key and click on a candle. But that doesn't work the way I tried it. I know that this is not correct because there can't be a CHARTEVENT_KEYDOWN and a CHARTEVENT_CLICK at the
Hi coders, this indicator prints a text object as soon as a trendline is drawn. I found the calculation for the angle in the MQL5 forum but it doesn't work correctly. The angle in degrees is always wrong. Just the directon (above or below zero)
Hi coders, here is a little test script I made. My problem is that I would like to switch timeframes and do something when the timeframe has changed. But the problem is that ChartSetSymbolPeriod() is not executed immediately and so everything after
Hi, when I draw an object, let's say a trendline, and I change the color and maybe the style. When I draw another trendline it has the same color and style as the trendline I modified before. Same with rectangles and other objects. Is it somehow
Hi coders, I made a small test indicator and it doesn't always work how it should. Sometimes an alert pops up but more often it doesn't. Is there something I forgot? Edit: Obviously it only works when I click on the corners or directly in the middle
Hi coders, I use the color red for a rectangle. If a predefined event happens I would like to make this red a bit darker. Mathematically spoken I would like to subtract C'50,50,50' from the normal color. Is that somehow possible without setting a new
Hi, it often happens that I see data gaps in my chart. Then I have to click 'refresh' in the right-mousebutton-menu and the chart is updated and the gaps are filled. Unfortunately it is sometimes a lot of work because each timeframe has to be