Ticaret robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Facebook üzerinde bulun!
Fan sayfamıza katılın
Komut dosyasını ilginç mi buldunuz?
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
Komut dosyasını beğendiniz mi? MetaTrader 5 terminalinde deneyin
Komut dosyaları

Reverse Trades For All Symbols Script - MetaTrader 4 için komut dosyası

Fast and reliable Tested in Demo account
Yayınlayan:
[Silindi]
Görüntülemeler:
1174
Derecelendirme:
(2)
Yayınlandı:
2024.04.09 17:44
Güncellendi:
2024.04.10 00:21
Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git

The strategy implemented in the script "Reverse_Trades_For_all_Trades_and_Symbols_V1.mq4" reverses all open trades for all symbols on the trading platform. When executed, the script iterates through all open trades, closing each one and opening an opposite trade for the same symbol. This effectively reverses the direction of each trade, allowing traders to profit from changes in market direction. It is important to thoroughly test the script in a demo account before using it on a live trading account.

Here's a breakdown of the key components:

OnStart(): This function is called when the script starts. It calls the ReverseTrades() function.

ReverseTrades(): This function iterates through all open trades using a loop. For each trade, it selects the trade and retrieves essential information such as order type, open price, lot size, and symbol. Then, it closes the existing order using OrderClose() and opens an opposite order using OrderSend().

OrderClose(): This function closes the existing order with the specified ticket, lot size, and close price.

OrderSend(): This function opens a new order in the opposite direction with the specified symbol, order type, lot size, and open price.

The script provides feedback via the Print() function to inform about the status of each operation, such as whether an order was closed or opened successfully.

This script can be useful for traders who want to quickly reverse their positions across all symbols in their MetaTrader platform.


    Trailing_StopLoss_for All_orders_and_symbols Trailing_StopLoss_for All_orders_and_symbols

    Trailing_StopLoss_for All_orders_and_symbols

    Simple continuous trend-following strategy for buying and selling based on predefined conditions Simple continuous trend-following strategy for buying and selling based on predefined conditions

    Simple continuous trend-following strategy for buying and selling based on predefined conditions

    Close Basket Pairs v1 Close Basket Pairs v1

    This MQL4 EA is designed to close positions for a basket of currency pairs based on certain profit and loss thresholds.

    Virtual SL TP Pending with SL Trailing for Symbol Chart Virtual SL TP Pending with SL Trailing for Symbol Chart

    Virtual SL TP Pending with SL Trailing for Symbol Chart