Articles by: David Williams

How do I delete a pending order?


How do I delete a pending order?

How do I delete an order after it has been open for 5 candles.

 

A. 
In the VTS Functions Toolbox, under Trade->MQL, use the MQL function “OrderDelete” to delete a pending order.

 

To delete after 5 bars, save the MQL variable “Bars” into a new Variable (one that you drag and drop).

The MQL builtin variable “Bars” is a running count of each bar on a chart, where the latest forming bar is the highest number (like 344). The bar on the chart before it (to the left) would be bar # 342.

 

Suppose you name your variable “mybars”. The key is to only set “mybars” once, at the same time that you create the pending order. Then create logic that states:

if:  Bars is greater or equal to mybars + 5

then: delete the pending order

How do I delete a pending order?

How do I delete an order after it has been open for 5 candles.

 

A. 
In the VTS Functions Toolbox, under Trade->MQL, use the MQL function “OrderDelete” to delete a pending order.

 

To delete after 5 bars, save the MQL variable “Bars” into a new Variable (one that you drag and drop).

The MQL builtin variable “Bars” is a running count of each bar on a chart, where the latest forming bar is the highest number (like 344). The bar on the chart before it (to the left) would be bar # 342.

 

Suppose you name your variable “mybars”. The key is to only set “mybars” once, at the same time that you create the pending order. Then create logic that states:

if:  Bars is greater or equal to mybars + 5

then: delete the pending order

RAQ

Using SendNotification on MetaTrader 4 and the iPhone

Follow These Step-by-step Instructions to Send Text Messages From Your MT4 Expert Advisor to Your Smart Phone

First, Download and Install the MetaTrader App

1

Search "MT4" from App Store on iPhone

2

Click "Get" to Download the App

3

Click "Install"

4

Click "Open"

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae, officia?

Setting-up MT 4 Platform

1

Click on App image to open

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae, officia?