Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2016.02.22 16:08
1 Click To Close All Open Positions at Current Attached Chart

1 Click To Close All Open Positions at Current Attached Chart - expert for MetaTrader 4

| English Español Português 日本語 Deutsch Русский

votes: 23

Click "Close All" button to close all your open positions at current attached chart.

Select CloseOnlyManualTrades = true to close only manual trades.

Select CloseOnlyManualTrades = false to close manual trades and/or other trades opened by an Expert Advisor.

This new version doesn't contain the code written below that previous versions had which may cause an infinite loop .

if(checkOrderClose==false) continue;

but instead brings an error control system to prevent an infinite loop while still closing all trades.

if(checkOrderClose == false)
         int errorCode = GetLastError();
         if (errorCode == 1 || errorCode == 2 || errorCode == 5 || errorCode == 6 || errorCode == 64 || errorCode == 65 || errorCode == 132 || errorCode == 133 || errorCode == 139) break;
         else continue;        

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

Modify All TP SL Modify All TP SL

The script modifies all orders (market and pending) on the symbol with specified Take Profit and Stop Loss.

iFractals 4all TF iFractals 4all TF

Buy or sell just by looking at the "arrow" as a signal. Very easy and simple.