mar
mar
Friends

Add friends via their profile or user search and you will be able to see if they are online

mar
Added topic Modify all running trades after one stoploss was changed
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
mar
Added topic Logic of a loop counter in a for-loop
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
mar
Added topic Question about OBJ_EDIT
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
mar
Added topic How to programatically minimize a chart window?
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
mar
Added topic How to find out the active chart window?
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
mar
Added topic Force a tick by calling OnCalculate() from a chart event
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
mar
Added topic Problem with the delay of ChartSetSymbolPeriod()
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
mar
Added topic Line touch alarm without checking all objects on each tick?
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
mar
Added topic Moneymanagement / currency problem with gold, indices, commodities
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));
mar
Added topic No adjustable speed for strategy tester anymore??
Is it just a problem with my MT4 or did the speed adjustment also disappear on your MT4
mar
Added topic Forcing a tick in a quiet market (or even on the weekend) possible?
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
mar
Added topic Disable autoscroll by scrolling manually backwards?
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
mar
Added topic Calling a script from an indicator by simulating a hot key
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
mar
Added topic How can I use two chart events at the same time (CHARTEVENT_KEYDOWN and CHARTEVENT_CLICK)?
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
mar
Added topic How to get the angle of a trendline and place a text object to it?
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)
mar
Added topic ChartSetSymbolPeriod() and a problem with the message queue
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
mar
Added topic Is it possible to set "real" default colors for graphical objects?
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
mar
Added topic Problems with CHARTEVENT_OBJECT_CLICK
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
mar
Added topic How to make a color a bit darker?
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
mar
Added topic How to refresh / reload the chart if not all bars are printed correctly
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