Forum

IndicatorShortName not visible

Hello to the experts, I tried to use the shortname function with a custom indicator , but nothing seems to appear in the chart window. Then I tried the for example MACD default codes, implemented in the INIT() area

Trailing code

Hello, I tried to use the following line, to create a stop at a certain gain level and (at the same time) a takeprofit modification, but I probably made a mistake, since the modification is not executed (the alert-sound is played sometimes): extern int TicketBuy,TicketSell; extern double

Array values

Hello, from another software than Metatrader I'm used to the following: When adressing Array values (for example Bars) - in the past - values from 1 upwards are used. Value 0 ist the present bar. (like MT) When adressing Array values - in the future - negative values are used. How does MT4 handles

Objects not stored

hello to the experts, I got a problem with the durability of objects. I use some custom indicators in charts , they have a normal draw object function(vertical lines) included. Now when I close the MT4 and restart it another time, the formally drawn objects dissapeared in those charts. I checked if

simple question

hello everybody, I have a problem, which may be easily corrected. In a EA I started to program I use the command line just to test buy signals in general. the mode is " every tick " and "visual" TicketBuy=OrderSend(Symbol(),OP_BUY,0.1,Ask,20, Bid-Stoploss*Point,Bid+Takeprofit*Point); Now when I use

limit (incoming) opening positions

hello to the experts, is there any program file (a way/ a script/an EA etc.etc.) to limit the open positions in the MT4 platform. the background is: if you use a signal provider with your MT4 directly you don't have a predefined max open positions paramter, which defines the limit thanks in advance

short question

I'm new to MT4 programming, I guess the answer to my question is simple: in the definition part there is: double A[]; in the program part there is: A[0]=trend[1]; // trend[1] in this case has the value -1 Comment(trend[1]," ",A[0]); now, when looking at the comment window by launching the (complete)

chart with indicator based on ticks

hello to the programming experts here, I got a short question: when - just as a simple example - using a code line like : for(i=0;i==Bars;i++) Buffer[i]=Close[i]; in a custom indicator (in a "separate_window") the Close prices are drawn from Bar 0 to the max number of Bars , it works fine... Now, if

include trailing stop

Hello everybody, this user here created a very interesting trailing stop tool. It works fine when, for example, placing it on a chart in the mt4 terminal. https://www.mql5.com/en/code/9530 Now, I'd like to integrate this functionality, if possible, into an expert adviser I've already programmed for

mt4 save test results

hello, does anybody know if there is any method to save and reload mt4 system tester results , to qiuckly reload former test results? thanks in advance