Codes

Highest - Lowest for MetaTrader 4

Simple chart to display the highest and lowest values for a data series over "n" bars period

Forum

Previous Day High-Low

Hi, I am new to MetaTrader and to its programming language, I have some experience with VB and WealthLab, anyway is not the same. I was wondering if someone could help me with the following idea: I want an indicator that plots the previous day high and low, in any time frame. For example, I use 1h

External data

Is it possible in MQL5 to work with external data? I mean importing price / volume data from a .csv or .txt file and to work on it? In MQL4 I used to import it on the history center F2. but I can find it in MQL 5. Thank you

Counting Orders

I ma trying to count how many pending BUY/SELL stop orders are at any given point. The code I am trying is below, but at the moment it counts nothing. Any ideas about what is it going on, or a different way to do it? Thanks. int OpenBuyOrders = 0 , OpenSellOrders = 0 ; //Count Pending Stop Orders

MT4 or MT5

I am starting to code some of my ideas in metatrader and I have one question. Shall I start this project using MT4 or with MT5? As I see it, MT4 is a robust system, with an active forum, articles, codebase, etc, etc. But I am worried about how long there will be support fot it. Or should I start

Closing market orders at 23:15

I want to close any outstanding market order at 23:15 every day. I am working with the following code, buy I am getting the error: 4108 (Invalid ticket.). I don't know what I am doing wrong. // Closing orders at end of day bool result ; double price ; int cmd , error ; if (( TimeHour (

INVALID_TRADE_PARAMETERS HELP

I am trying to place a BuyStop order but I am getting ordersend error 3 (ERR_INVALID_TRADE_PARAMETERS) I have checked the parameters that I am sending but still can't find the error, could someone help me please? OrderSend ( EURUSD , OP_BUYSTOP , 0.1 , 1.563 , 5 , 1.5615 , 1.566 , " My order " , 0

Arrow in chart

I need to draw an arrow in the chart. There are several other forums whit an answer to this, but i don't know what I am doing wrong, there are no arrows. can someone help me please? My code is: int start () { double LastHigh ; LastHigh = iHigh ( NULL , PERIOD_D1 , 1 ) ; if ( Close > LastHigh )