Marbo
Marbo
Marbo
Added topic Is there a real bug in MT5? Bars() works fine in a script but not in an indicator...?!
Hey guys, here you find a script and an indicator and both use Bars() . Please have a look at the attached screenshot. The first 10 values are from the script and below them you see the same 10 values but from the indicator. Do I miss something or is
Marbo
Added topic Problem with a simple indicator printing dots on candles
Hello guys, while learning MQL5 I wanted to code an indicator which prints a dot in the middle of the candle body. A green dot if it is a bullish candle and a red dot if it is a bearish candle. Can somebody please tell me what's wrong with my code
Marbo
Added topic CopyFileW()/MoveFileW()/FileMove() problems..
Hello guys, I need some help with File-Management... if some requirements are met, my indicator saves a screenshot. This screenshot can only be saved in MQL5/Files. Now I want to copy or move this screenshot to any free folder. I tried it with
Marbo
Added topic Time[5] in Local Time?
Hello, is there an easy way to convert any timestamp from MT4 time to local time ? Something like TimeLocal(Time[5])? I tried it with TimeGMTOffset(), TimeDaylightSavings() and some other things but it doesn't really work.. Any help is very
Marbo
Added topic CHARTEVENT_OBJECT_CREATE does not react when an object is drawn
Hello guys, I am very confused. Why does this code not work if I press 'Q' but it works when I draw any object manually? void OnChartEvent ( const int id
Marbo
Added topic ZigZag indicator only drawn in the background?
Hi guys, is there a possibility to modify the code of the ZigZag indicator that the lines are drawn in the background behind the candles? I didn't find a solution how to do it with the buffers. I don't want to set the chart on foreground because I
Marbo
Added topic Hide Zigzag indicator if line chart is active
Hey guys, I permanently use the Zigzag indicator in my template. But when I switch to the line chart I want to hide the Zigzag indicator. I thought about checking the CHART_MODE within the Zigzag code and if the line chart is active I wanted to set
Marbo
Added topic Question about OnCalculate() regarding prev_calculated / rates_total / IndicatorCounted()
Hi guys, I am (still) confused about the things in the headline. I made a little test indicator which plots a dot in the middle of a candle if the candle's size is larger than its ATR(100). Of course the indicator should only work if a new bar is
Marbo
Added topic Syntax problem with Arrays
Hi guys, can anyone tell me how the correct syntax looks like? int timeframes[ 3 ]; if ( _Period == PERIOD_W1 ) timeframes[ 3 ]={ PERIOD_D1 , PERIOD_H4 , PERIOD_H1 }; else if ( _Period == PERIOD_D1 ) timeframes[ 3 ]={ PERIOD_H4 , PERIOD_H1
Marbo
Added topic Scanning 28 symbols in 5 timeframes
Hi all! I made an indicator which scans 28 forex pairs in 5 timeframes for a pre-defined setup. In this example I just scan for a candle's close above the previous candle's high. My question is now if my code is an elegant and efficient way to do it
Marbo
Added topic Change existing chart indicator color in a code?
Hey guys, is it somehow possible to change the color of a moving average in a code? Example: I have a moving average in my chart. Now I want to press a key and the color of the moving average should change
Marbo
Added topic How can I make sure that the latest history data is loaded when using a script?
Hey guys, I made this little test-script: void OnStart () {    Alert ( iTime ( "USDTHB" , 60 , 1 )); } The result was a date from 2018. When I started the script once again, the correct time and date was printed. I know this is because I
Marbo
Added topic Problem with enumerations
Hi, I wanted to code a script which changes the chart-mode (line, bars, candles) of all open charts . When dragging the script into a chart I want to choose the chart-mode with a pulldown-menu. But I don't know how to use the ENUM_CHART_MODE
Marbo
Added topic OrderModify() in MQL5?
Hi guys, I am migrating all my stuff from MQL4 to MQL5 and now I need to modify the stoploss of a position. I didn't find any corresponsing function to OrderModify() in MQL5. Can anyone tell me how to change the stoploss of a position when I received
Marbo
Added topic Big problems with iATR and MQL5
Hi guys, I am trying to convert all my stuff from MQL4 to MQL5 and I have a big problem with iATR (and a lot of other stuff). Firstly, the MQL5-iATR-function returns a handle. Why? It was so easy with MQL4. Just returned the number and you're done
Marbo
Added topic How can I define a default parameter for a function?
Hi guys, pretty difficult to explain in a headline. I have this function: double ClosePrice( string symbol, int timeframe, int position) {    return    iClose (symbol, timeframe, position); } And I call this function like this
Marbo
Added topic Any possibility to get the status of the crosshair?
I didn't find any ChartGetInteger() function showing if the crosshair is enabled. Are there other possibilites
Marbo
Added topic Can I check if CTRL or SHIFT is pressed when using CHARTEVENT_KEYDOWN?
Hi guys, I just used CHARTEVENT_KEYDOWN this way: if (lparam== "A" )... Is it somehow possible to check if SHIFT and A are pressed? I didn't find anything about it in the MQL4 docs
Marbo
Added topic Insert/remove indicator by CHARTEVENT_KEYDOWN possible?
Hey guys, I sometimes want to see the Bill Williams Fractal indicator in my charts and I wondered if it is somehow possible to insert it by just pressing a key. Removing it can be simply done by ChartIndicatorDelete() but I have no idea how to insert
Marbo
Added topic Script to calculate the risk of all open orders. Problems with JPY pairs.
Hi guys, can you tell me what's wrong with my calculations? Works fine on 5-digit-pairs as well as on metals but to get the correct values for JPY pairs I need to divide them by 100. But why? I thought my calculation is correct for every pair. void
123