Marbo
Marbo
Marbo
Added topic Commission of a running position
Hello guys, I made this script but it only shows 0.0 as a result when I drag the script into a chart with a running position. Can somebody tell me what's wrong with the code? void OnStart () {    for ( int i= 0 ;i< PositionsTotal ();i++)
Marbo
Added topic Two colors in an indicator with one buffer possible?
Hey guys, I made a small indicator which shows inside candles. Now I want to check if the candle's close is above or below the open price and I want to change the color of the dot accordingly. I know how to do this with two buffers but I want to know
Marbo
Added topic How do you assess if a spread is (relatively) large or small?
Hello guys, I am not sure how to assess if a spread is large or small. I tried to compare it with the average daily range and I also compared the spread to the value of the currency itself. What makes most sense for you? It is not only the points
Marbo
Added topic Problem with the loop of an indicator
Hey guys, I will never understand how the loop of an indicator works. It's easy when I calculate the whole indicator with every tick but it should be a bit more efficient. Only the new bars should be calculated. I read many articles about
Marbo
Added topic How can I check if a position was closed by the stoploss?
Hello guys, I want to make an expert which checks if a position was closed by the stoploss. As soon as a position is closed by a stoploss I want to be noticed by an Alert. What is the best way to do this? Would you check the order-history with every
Marbo
Added topic Import real stock data for backtests into MT5 possible?
Hello guys, I just opened a MetaQuotes demo account because they offer real time stock data from the NASDAQ but I saw that the quality of the EOD data is not the best (daily open and close is very often different from other data sources like
Marbo
Added topic Checking CHARTEVENT_KEYDOWN doesn't work with '+' and '-'
Hey guys, Can someone tell me why it's not possible to check if + or - is pressed in CHARTEVENT_KEYDOWN ? It doesn't work with if (lparam=='+') and it doesn't work with if (lparam==char(189)) either. But why? How can I check if these keys are
Marbo
Added topic How can I update a CSV file without overwriting it?
Hello guys, can someone tell me how to update a file without overwriting it? I made a small script which saves the current time to the file TEST.CSV. This script overwrites the file before but I want it to add the current time to the existing file so
Marbo
Added topic Installing the MT5 on a Mac (M2 processor) with Parallels Desktop
Hello! Did anyone install MT5 on a Mac with M2 processor using Parallels Desktop? I always receive an error when I click on the install-file. I used the MT5 install file from different brokers and from MetaQuotes but nothing works
Marbo
Added topic Problems with a script which should delete a pending order
Hey guys, I always get error #4756 and I have no idea why... can anyone help? void OnStart () {    int totalOrders= OrdersTotal ();    for ( int i=totalOrders;i>= 0 ;i--) {        ulong ticket=
Marbo
Added topic ChartNavigate() is driving me crazy...
Hey guys, I am really desperate about the function ChartNavigate(). The following script should scroll to the the start of yesterday's daily candle on the m1 timeframe. The variable "pos" is absolutely correct. Why doesn't ChartNavigate() work? The
Marbo
Added topic Checking all running positions and move the SL to breakeven when critera are met
Hello guys, can you help me with this problem? I always receive an invalid request  (error 4756 invalid stops) when the SL should be moved to breakeven. But in the log file I can see that the SL is correct
Marbo
Added topic Sending emails with a screenshot as attachment?
Hey guys, does anyone work with emails with attachments? I found an older posting about that topic but that’s not too easy to understand. Maybe someone already uses this and can help me? I made an indicator which runs on a server and alerts me when a
Marbo
Added topic How can I check if a market is closed?
Hello guys, is there a possibility to check if a market is closed? I tried to find something within SymbolInfoInteger() but there was nothing useful for me. Thanks
Marbo
Added topic Printing a line at the lowest low of the last 100 candles
Hello guys, can someone tell my why this code doesn't work correctly? #property indicator_chart_window #property indicator_buffers 1 #property indicator_plots    1 #property indicator_type1    DRAW_LINE #property indicator_color1
Marbo
Added topic How can I multiply ENUM_TIMEFRAMES?
Hello, I made this test script and it doesn't work because I don't know how to multily timeframes correctly. void OnStart () {    ENUM_TIMEFRAMES tf= PERIOD_M5 ;    ENUM_TIMEFRAMES htf=tf* 48 ;    Print (htf);
Marbo
Added topic Question about a multi-timeframe matrix
Hello guys, I made this test-indicator which checks all of my selected pairs and timeframes for correct history data so I can work with them. This indicator should only check the timeframe when it's necessary. So it doesn't make sense to check the H4
Marbo
Added topic List all files in the Files-folder with FindFileFirst() possible?
Hello, is it possible to list all files of the directory TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL5\\Files\\" ? I tried to use the script from Metaquotes which is found at the description of FindFileFirst() but that didn't work. I always
Marbo
Added topic Market orders always fail because of error #4756 [Unsupported filling mode]
Hello guys, I plot a line in my chart, called "sl". Then I execute my code and I always receive this [Unsupported filling mode] error #4756. I use almost the same code for my pending orders and they work. But where is the difference between a market
123