Forum

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 pressed

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 when I execute the script 5 times I want to see 5

SYMBOL_TRADE_TICKVALUE_PROFIT / SYMBOL_TRADE_TICKVALUE_LOSS difference?

Hello guys, I am just coding a little tool to calculate the position size. I always used SYMBOL_TRADE_TICKVALUE for my calculations but I noticed today that there are two different tickvalues. With some pairs both tickvalues are identical and with some pairs they are different. Can someone please

Buy stop / sell stop with a line

hi, is there any better way to place a buy stop or sell stop ? i heard about an indicator (or script?) that prints two lines. one line for the buy/sell stop and the other line for the stoploss. these lines should be easily moved like a normal chart-line. is there something like this existing? or do

How can I get the „inner“ spread ?

Hey guys, in the screenshot you see two bid prices and two ask prices. The inner spread are the bid/ask lines if they are activated in the chart settings. The real and tradable spread are the dotted lines which I get by SymbolInfoDouble(_Symbol,SYMBOL_ASK) and SymbolInfoDouble(_Symbol,SYMBOL_BID)

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

How can I get the order comment of an executed order?

Hello guys, I have two questions about this code: 1) why do I receive two notifications? 2) instead of the order comment I get nothing. Why? //+------------------------------------------------------------------+ //| TradeTransaction function |

How can I get the Order Time Setup for a running position?

Hey guys, is there something like ORDER_TIME_SETUP for a running position or how can I get the time when the order was created? I didn't find anything for PositionGetInteger(). Thanks for help

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= OrderGetTicket (i); if ( OrderSelect (ticket)) { string orderSymbol= OrderGetString (

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 chart jumps to random dates instead to the