ICT Fair Value Gap Indicator

TopicStarter

Moderator
Apr 15, 2024
10,076
4
38

Introduction​

Evaluating trading tools is a perpetual exercise for any adept trader. Today, we're going to take a closer look at the ICT Fair Value Gap Indicator. User comments and a rating of 4.5 provide some initial insights, but let’s dive deeper into its functionalities, performance over the last year, and see if it lives up to its hyped reputation.

Features of ICT Fair Value Gap Indicator​

The ICT Fair Value Gap Indicator boasts several functionalities designed to identify fair value gaps (FVG) in the market. Here are some of the key features:

  • Detects FVGs on various time frames.
  • User-friendly interface aimed at simplifying complex data.
  • Customizable alerts for identified gaps.
  • Real-time updates and historical data analysis.
  • Compatibility with multiple trading platforms.

Users have expressed mixed feelings about these features. For instance, Zé Roberto () rated it a solid 5, appreciating the generosity of the share, while Antonio Mazzilli ([USER=antonellom]) had issues with its weekend functionality and performance on lower time frames.

[HEADING=2]Performance Analysis[/HEADING]
Based on the statistics available on [URL=https://forexroboteasy.com/trading-robot/ict-fair-value-gap-indicator/]this website[/URL], the ICT Fair Value Gap Indicator has shown consistent results over the past year. However, there are some observations worth noting:

[B]Pros:[/B]
[LIST]
[*]High accuracy in identifying significant gaps.
[*]Ease of use with a straightforward interface.
[*]Consistent performance in volatile markets.
[/LIST]

[B]Cons:[/B]
[LIST]
[*]Limited functionality during weekends (as highlighted by Antonio Mazzilli).
[*]Inconsistent performance on lower time frames.
[*]Dependence on market conditions, making it less reliable in calm periods.
[/LIST]

Pavel048 ([USER=pavel048]), despite these limitations, found the indicator’s simplicity and reliability to be standout features.

[HEADING=2]Strengths and Weaknesses[/HEADING]
[B]Strengths:[/B]
[LIST]
[*]Ease of use for both beginners and seasoned traders.
[*]High accuracy in identifying fair value gaps.
[*]User-friendly alerts and interface.
[/LIST]

[B]Weaknesses:[/B]
[LIST]
[*]Performance inconsistency on weekends and lower time frames.
[*]Dependency on market volatility.
[*]Absence of native support across all trading platforms.
[/LIST]

[HEADING=2]Source Code of ICT Fair Value Gap Indicator[/HEADING]
Let’s address the elephant in the room – the source code of the ICT Fair Value Gap Indicator. The actual source code for the original robot sold on MQL5 is not public. However, we at EASY Trading Team can create a similar code based on the detailed description provided on the MQL5 marketplace.

Should you have any questions or need help with the code, feel free to ask. Remember, the example code would be foundational and could be customized to better suit your trading needs.

[CODE]mql5
//+------------------------------------------------------------------+
//| ICT_FVG.mq5 |
//| Copyright 2024, Forex Robot EASY Team |
//| https://forexroboteasy.com/ |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 Green

#include <Trade\Trade.mqh>
CTrade trade;

// Buffers for storing indicator values
double UpperBuffer[];
double MiddleBuffer[];
double LowerBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
// Indicator buffers mapping
SetIndexBuffer(0, UpperBuffer);
SetIndexBuffer(1, MiddleBuffer);
SetIndexBuffer(2, LowerBuffer);

IndicatorSetString(INDICATOR_SHORTNAME, ICT Fair Value Gap);
IndicatorSetInteger(INDICATOR_DIGITS, _Digits);

return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Custom indicator function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int limit = rates_total - prev_calculated;
if(limit > 0) limit--;

// Loop through rates (candles)
for(int i = limit; i >= 2; i--)
{
// Detect Fair Value Gap
if((high[i] < low[i+1]) && (low[i] > high[i+2]))
{
UpperBuffer[i] = high[i];
MiddleBuffer[i] = (high[i] + low[i]) / 2;
LowerBuffer[i] = low[i];
}
else
{
UpperBuffer[i] = EMPTY_VALUE;
MiddleBuffer[i] = EMPTY_VALUE;
LowerBuffer[i] = EMPTY_VALUE;
}
}

return(rates_total);
}

//+------------------------------------------------------------------+
//| Helper function to display alerts |
//+------------------------------------------------------------------+
void SendAlert(string message)
{
// Display popup message
Alert(message);

// Send push notification
SendNotification(message);

// Send an email (configuration required in MT5)
SendMail(ICT FVG Alert, message);
}

//+------------------------------------------------------------------+
//| Main trading logic |
//+------------------------------------------------------------------+
void StartTrading()
{
// Retrieve current account information
double lot_size = AccountInfoDouble(ACCOUNT_BALANCE) * 0.01;
double stop_loss = 30; // 30 pips
double take_profit = 60; // 60 pips

int ticket;

// Example: Buy Order
trade.SetExpertMagicNumber(123456);
trade.PositionOpen(_Symbol, ORDER_TYPE_BUY, lot_size, SymbolInfoDouble(_Symbol, SYMBOL_BID), stop_loss, take_profit);
if(trade.ResultRetcode() != TRADE_RETCODE_DONE)
Print(Order failed: ,trade.ResultRetcode());
else
ticket = trade.ResultOrder();

// Log trade information
Print(Trade executed: Ticket #, ticket);
SendAlert(Trade executed: Ticket # + IntegerToString(ticket));
}

//+------------------------------------------------------------------+
//| Start function |
//+------------------------------------------------------------------+
void OnTick()
{
// Only proceed if there is a valid FVG signal
if(MiddleBuffer[0] != EMPTY_VALUE)
{
// Example: Execute trading logic only if there is a valid signal
StartTrading();
}
}

//+------------------------------------------------------------------+
//| Initialization |
//+------------------------------------------------------------------+
int OnInit()
{
// Ensure that the expert is only attached to charts with enough history
if(Bars(_Symbol,PERIOD_CURRENT) < 3)
{
Print(Not enough bars for analysis);
return(INIT_FAILED);
}

return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Cleanup |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
// Clean-up actions if needed
}

//+------------------------------------------------------------------+
// EOF ICT_FVG.mq5 |
//+------------------------------------------------------------------+
[/CODE]

[HEADING=2]Download ICT Fair Value Gap Indicator Robot - Easy Trading Forum[/HEADING]
If you're looking to download a trading robot similar to the ICT Fair Value Gap Indicator, head over to [URL=https://forexroboteasy.com/trading-robot/ict-fair-value-gap-indicator/]this page[/URL]. Note that the EASY Trading Team doesn’t sell the ICT Fair Value Gap Indicator itself; instead, we provide a version based on its market description.

In conclusion, the ICT Fair Value Gap Indicator presents promising functionalities but comes with its own set of limitations. Engage in discussions on our forum, share your experiences, and let’s collectively get the most out of this trading tool.