Classic and Virtual Trailing – EA MetaTrader 4

Classic and Virtual Trailing - expert for MetaTrader 4
Classic Trailing => Use Stop Loss to Trail and it does reflect in your broker serverVirtual Trailing => Does not Trail using Stop Loss and it does not reflect in your broker server.Trailing Gap = A Gap from Bid/Ask PriceTrailing Start = Distance from Order Entry Price (Order Open Price) to start trailing Classic and … Read more

Simple Yet Effective Breakout Strategy – EA MetaTrader 5

Simple Yet Effective Breakout Strategy - expert for MetaTrader 5
This breakout strategy is the base for our QAlpha StockTrend product:  You can freely modify/add your own filters to create your own unique version of this strategy. The basic premise of the strategy: Buy/Cover as soon as the price breaks above n bars high Short/sell as soon as the price breaks below n bars low Backtested on … Read more

Code blocks for “Counters” like Count “X” time and pass – EA MetaTrader 5

Code blocks for "Counters" like Count "X" time and pass - expert for MetaTrader 5
01. Count “X” Times and then pass. Step 01 – Created a variable for set the count limit. you can use it as an input parameter as well of optimization in your code.  Step 02 – Create another variable to store the counted limit (How many times it has been counted). Step 03 – Once … Read more

A Code block to detect A “New Candle/Bar” using bars history (very effective way) – EA MetaTrader 5

A Code block to detect A "New Candle/Bar" using bars history (very effective way) - expert for MetaTrader 5
In previous code I used the time to detect a new bar. This time let’s use the bars count to detect a new bar. it’s way lighter and faster than using the time method. Declare the variables in integer data type to store the bar counts.  Assign the bars count for the “BarsTotal_OnInt” at the … Read more

Simple continuous trend-following strategy for buying and selling based on predefined conditions – EA MetaTrader 4

Simple continuous trend-following strategy for buying and selling based on predefined conditions - expert for MetaTrader 4
This MetaTrader 4 (MT4) script implements a simple continuous trend-following strategy for buying and selling based on predefined conditions. Here’s a breakdown of the script: Initialization: The script initializes and prints a message when initialized successfully. Deinitialization: The script deinitializes and prints a message when deinitialized. OnTick Function: This function executes whenever there’s a new … Read more

Trailing_StopLoss_for All_orders_and_symbols – EA MetaTrader 4

Trailing_StopLoss_for All_orders_and_symbols - expert for MetaTrader 4
This script will trail the stop loss of all open buy and sell orders. Adjust the TrailStart and TrailStop parameters to your preferred levels. This is a basic example and can be further optimized and customized based on your specific requirements. Trailing_StopLoss_for All_orders_and_symbols – expert for MetaTrader 4

Three White Soldiers and Three Black Crows for Chart Symbol – EA MetaTrader 4

Three White Soldiers and Three Black Crows for Chart Symbol - expert for MetaTrader 4
This script is a trading strategy called “Three White Soldiers and Three Black Crows” implemented in MQL4. It identifies patterns in price action known as “Three White Soldiers” and “Three Black Crows” and executes buy or sell trades accordingly. Here’s a brief description of the key components of your script: The script is designed to … Read more

Close Basket Pairs v1 – EA MetaTrader 4

Close Basket Pairs v1 - expert for MetaTrader 4
This MQL4 script is designed to close positions for a basket of currency pairs based on certain profit and loss thresholds. Here’s a brief description: The script is called “CloseBasketPairs.mq4”. It is copyrighted by MetaQuotes Software Corp. in 2024. It provides a link to the MetaQuotes website. The version of the script is 1.01. The … Read more

Virtual SL TP Pending with SL Trailing for Symbol Chart – EA MetaTrader 4

Virtual SL TP Pending with SL Trailing for Symbol Chart - expert for MetaTrader 4
T”Virtual_SL_TP_Pending_with_SL_Trailing.mq4.” It’s designed to manage trades by setting virtual stop loss and take profit levels, along with a virtual pending order with an optional trailing stop loss feature. Here’s a breakdown of the script: Copyright and Link: Specifies the copyright information and a link to the creator’s website. Version: Indicates the version of the script. … Read more

Simple Code for Detect A “New Bar or New Candle ” Received – EA MetaTrader 5

Simple Code for Detect  A  "New Bar or New Candle " Received - expert for MetaTrader 5
This code block detects a New Bar or a New Candle when it has received.  the basic principle of the codes is very simple. First the code stores the Time of the previous bar / Candle. (Then add 60 seconds (equals to 1 min. you can add time as you want) to the Time of … Read more