Tag: MQL4

Differences Between Automated Trading and Manual Forex Trading

Automated trading became a reality recently. With faster computers, manual Forex trading started to lose its significance. Statistics don’t lie. Nowadays, over eighty percent of orders belong to automated trading. Moreover, the percentage is on the rise. Does this mean that the manual Forex trading will disappear? Or, that the human’s touch in the financial […]

Forex advisor for backtesting

In this post we share with you an Expert Advisor that helps us with our Backtesting. Specifically, we want to haveclean and live data before we run our Backtesting. This Expert Advisor will automatically save data at any given time in our MT4 platform, giving us reliable information to test our strategies.

Feel free to leave us some feedback if you have any questions on the code or if you just like our tutorials!

Source code below

Feel free to share!

(more…)

How do we track market orders? Manually it’s easy – you just look at the information provided at the bottom of the terminal. But what if we want to do it from inside a Forex-robot?

Well, it’s also pretty simple – we just need to use the OrderSelect() function to select the order and then we are able to use a range of functions to find out additional information about our order. Today I will show you how to use OrderSelect(), OrderStopLoss(), OrderTakeProfit(). 

Also, I will give you an extremely useful tip on how to check if an order has been closed or not using the OrderCloseTime() function. This part will be very important when we get to coding our Expert Advisor in Section 3 of the course.

Source code beneath the video

The video below is usually part of a paid course. Here you have the chance to see it for free. Simply enter your details and click “Play”.

 

This video is part of our Algorithmic Trading course. If you like it, you can check out by clicking the button below:

Algorithmic Trading Course

(more…)

Ordersend

Ordersend

Hello friends!

In today’s tutorial we will learn how to use the OrderSend function. OrderSend is an MQL4 trade function which is used to place Buy and Sell orders on the Forex Market. Once an order is placed you will be able to see it in Meta Trader 4 just like you can view any other position. 

OrderSend Parameters

In this tutorial we will focus on the StopLoss and TakeProfit parameters. In the previous tutorial we learned how to use extern variables to allow input of parameters by the trader. The external values were used to calculate the StopLoss and TakeProfit levels, which we will use in the OrderSend function today.

Another important parameter is cmd variable, which is used to specify the direction of your intended trade. In the video below I will show you how to use the OP_BUY keyword to execute a Buy transaction. Similarly, OP_SELL can be used to execute Sell orders.

Here is a list of other parameters that the OrderSend function allows you to input:
int OrderSend(
string symbol, // symbol
int cmd, // operation
double volume, // volume
double price, // price
int slippage, // slippage
double stoploss, // stop loss
double takeprofit, // take profit
string comment=NULL, // comment
int magic=0, // magic number
datetime expiration=0, // pending order expiration
color arrow_color=clrNONE // color
);

We will discuss most of  these parameters in today’s tutorial. However, more information can always be found on the MetaQuotes’ official website: OrderSend Reference

Video Tutorial

Alright! Let’s go ahead and send some orders with OrderSend. The video below is usually part of a paid course. Here you have the chance to see it for free. Simply enter your details and click “Play”

Remember – the code for this tutorial is located beneath the video.

This video is part of our Algorithmic Trading course. If you like it, you can check out by clicking the button below:

Algorithmic Trading Course

(more…)

What are you waiting for?

START LEARNING FOREX TODAY!

as seen on: