Forum

open file to append

hi, i am writing up a log file from an EA. if the EA is restarted i want it to carry on writing to the same file... but append to the end of the file. initially this did not work for me, so i searched the forum and found https://forum.mql4.com/13774. i applied the directions there and my init()

Changing y-axis labels for an Indicator

Hi! I was wondering if anybody knows how to change the labeling on the y-axis of an indicator? At present my indicator has a fixed range of values running from -100 to +100. I have added levels at +30, +50 and +70. I am happy with the labels on the level lines. However, I would like to change the

Setting window name for Custom Indicator in Separate Window

hi! i am in the process of writing an indicator which will be displayed in a separate window. the functionality is complete and now i am just sorting out the aesthetics. in the corresponding region of the Data Window each of the indicator lines has an appropriate name, however, the "group" of lines

Can we determine whether an indicator is attached or if it is being run through iCustom?

hi! i have an indicator which draws quite a lot of objects onto a chart when it is attached. these objects are in addition to the lines associated with the indicator buffers . when i call this indicator from within an EA obviously the latter lines do not show up on the chart BUT all of the other

Indicator data becoming corrupted

hi! i have written a custom indicator which draws some additional curves onto the main chart window. the indicator works well for a while but after some time, for example, if i come back to the chart after a few hours, i find that the indicator lines have become corrupted: they reflect the wrong

Placing indicator arrows at fixed offset (like builtin fractals)

hi! i have written an indicator which places arrows either above/below some candles as indicators of sell/buy opportunities. i want these arrows to be placed at a constant (screen or pixel) offset from the high/low of the candle. what i am trying to achieve is precisely what you get with the builtin

attaching indicator to chart from within EA

hi, i have an EA which uses a couple of indicator functions as part of the trading strategy. however, to monitor the progress of the EA it would be good to have the indicators showing on the chart as well (running with the same parameters that are being used from within the EA). setting this up is

curious behaviour for two EA in parallel

hi, i am running an EA on two currencies (GBP and EURUSD) on H1 charts. i 13:00 each of the EAs were supposed to initiate two pending orders (one BUYSTOP and one SELLSTOP each). here is the log: 13 : 00 : 00 grapple GBPUSD,H1: type: sell stop 13 : 00 : 00 grapple GBPUSD,H1: volume: 0.29000

retaining more logs

hi, metatrader seems to automatically delete old log files from .../experts/logs/, leaving only the last five trading days. is it possible to configure it to not delete the old log files? i realise that i could write a script to rename or move the old log files, but it would be easier to just set an

fixed format output in MQL4

hi, is it possible to produce fixed format text output in MQL4? something like sprintf()? i know that DoubleToStr() can be used to specify the number of places after the decimal comma, but if you are wanting to format data into a table something like this: 1.253 103.25 92.103 92.91 105.293 1.37 then