Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ICT Fair Value Gap

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tkaboris
    replied
    Originally posted by sierrajpr View Post
    Code:
    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Gui.Tools;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;
    using NinjaTrader.NinjaScript.Indicators;
    using NinjaTrader.NinjaScript.DrawingTools;
    using NinjaTrader.NinjaScript.Indicators.Gemify;
    #endregion
    
    //This namespace holds Strategies in this folder and is required. Do not change it.
    namespace NinjaTrader.NinjaScript.Strategies
    {
    public class test : Strategy
    {
    private int Var;
    
    private NinjaTrader.NinjaScript.Indicators.Gemify.ICTFVG ICTFVG1;
    private ICTFVG fvgIndicator;
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Enter the description for your new custom Strategy here.";
    Name = "test";
    Calculate = Calculate.OnBarClose;
    EntriesPerDirection = 1;
    EntryHandling = EntryHandling.AllEntries;
    IsExitOnSessionCloseStrategy = true;
    ExitOnSessionCloseSeconds = 30;
    IsFillLimitOnTouch = true;
    MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix;
    OrderFillResolution = OrderFillResolution.Standard;
    Slippage = 0;
    StartBehavior = StartBehavior.WaitUntilFlat;
    TimeInForce = TimeInForce.Gtc;
    TraceOrders = false;
    RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
    StopTargetHandling = StopTargetHandling.PerEntryExecution;
    BarsRequiredToTrade = 40;
    // Disable this property for performance gains in Strategy Analyzer optimizations
    // See the Help Guide for additional information
    IsInstantiatedOnEachOptimizationIteration = true;
    Parameter = 1;
    Var = 1;
    }
    else if (State == State.Configure)
    {
    AddDataSeries("ES 09-23", Data.BarsPeriodType.Minute, 5, Data.MarketDataType.Last);
    }
    else if (State == State.DataLoaded)
    {
    ICTFVG1 = ICTFVG(Close, true, NinjaTrader.NinjaScript.Indicators.Gemify.FVGPeriodTypes.Minute, 5, 1000, true, 10, 1.1, 0.01, NinjaTrader.NinjaScript.Indicators.Gemify.FVGFillType.CLOSE_THROUGH, true, false, Brushes.Maroon, Brushes.Maroon, Brushes.DarkGreen, Brushes.DarkGreen, 13, 4, true, NinjaTrader.NinjaScript.DrawingTools.TextPosition.TopRight, new SimpleFont("Verdana", 12) {Bold = false, Italic = false}, Brushes.WhiteSmoke, Brushes.DimGray, Brushes.Blue, 50);
    fvgIndicator = ICTFVG(Close, true, NinjaTrader.NinjaScript.Indicators.Gemify.FVGPeriodTypes.Minute, 5, 1000, true, 10, 1.1, 0.01, NinjaTrader.NinjaScript.Indicators.Gemify.FVGFillType.CLOSE_THROUGH, true, false, Brushes.Maroon, Brushes.Maroon, Brushes.DarkGreen, Brushes.DarkGreen, 13, 4, true, NinjaTrader.NinjaScript.DrawingTools.TextPosition.TopRight, new SimpleFont("Verdana", 12) { Bold = false, Italic = false }, Brushes.WhiteSmoke, Brushes.DimGray, Brushes.Blue, 50);
    SetTrailStop(@"5", CalculationMode.Percent, 0, false);
    SetProfitTarget(@"20", CalculationMode.Ticks, 0);
    }
    }
    
    protected override void OnBarUpdate()
    {
    // Check for FVG conditions and implement your strategy logic here
    if (fvgIndicator != null && fvgIndicator.FVGList.Count > 0)
    {
    // Access FVG data and information using fvgIndicator.FVGList
    // Implement your trading logic based on the detected FVGs
    // For example, you can enter long or short positions when specific FVG conditions are met.
    }
    }
    
    
    #region Properties
    [NinjaScriptProperty]
    [Range(1, int.MaxValue)]
    [Display(Name="Parameter", Order=1, GroupName="Parameters")]
    public int Parameter
    { get; set; }
    #endregion
    
    }
    }
    ​
    I have this code for my strategy but whenever I try to reference the FVGlist ( I see the FVGs on the chart) the list is empty....what am I doing wrong?
    Can you share an updated strategy how you implemented and accessed list?
    i am trying to access fvg variable from the indicator and i just cant
    fvg.lowerPrice
    Last edited by tkaboris; 09-09-2023, 10:33 AM.

    Leave a comment:


  • tkaboris
    replied
    gemify

    How can i access fvg.lowerPrice in the strategy?
    Last edited by tkaboris; 09-09-2023, 10:34 AM.

    Leave a comment:


  • Mike0405
    replied
    Originally posted by sierrajpr View Post
    Code:
    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Gui.Tools;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;
    using NinjaTrader.NinjaScript.Indicators;
    using NinjaTrader.NinjaScript.DrawingTools;
    using NinjaTrader.NinjaScript.Indicators.Gemify;
    #endregion
    
    //This namespace holds Strategies in this folder and is required. Do not change it.
    namespace NinjaTrader.NinjaScript.Strategies
    {
    public class test : Strategy
    {
    private int Var;
    
    private NinjaTrader.NinjaScript.Indicators.Gemify.ICTFVG ICTFVG1;
    private ICTFVG fvgIndicator;
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Enter the description for your new custom Strategy here.";
    Name = "test";
    Calculate = Calculate.OnBarClose;
    EntriesPerDirection = 1;
    EntryHandling = EntryHandling.AllEntries;
    IsExitOnSessionCloseStrategy = true;
    ExitOnSessionCloseSeconds = 30;
    IsFillLimitOnTouch = true;
    MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix;
    OrderFillResolution = OrderFillResolution.Standard;
    Slippage = 0;
    StartBehavior = StartBehavior.WaitUntilFlat;
    TimeInForce = TimeInForce.Gtc;
    TraceOrders = false;
    RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
    StopTargetHandling = StopTargetHandling.PerEntryExecution;
    BarsRequiredToTrade = 40;
    // Disable this property for performance gains in Strategy Analyzer optimizations
    // See the Help Guide for additional information
    IsInstantiatedOnEachOptimizationIteration = true;
    Parameter = 1;
    Var = 1;
    }
    else if (State == State.Configure)
    {
    AddDataSeries("ES 09-23", Data.BarsPeriodType.Minute, 5, Data.MarketDataType.Last);
    }
    else if (State == State.DataLoaded)
    {
    ICTFVG1 = ICTFVG(Close, true, NinjaTrader.NinjaScript.Indicators.Gemify.FVGPeriodTypes.Minute, 5, 1000, true, 10, 1.1, 0.01, NinjaTrader.NinjaScript.Indicators.Gemify.FVGFillType.CLOSE_THROUGH, true, false, Brushes.Maroon, Brushes.Maroon, Brushes.DarkGreen, Brushes.DarkGreen, 13, 4, true, NinjaTrader.NinjaScript.DrawingTools.TextPosition.TopRight, new SimpleFont("Verdana", 12) {Bold = false, Italic = false}, Brushes.WhiteSmoke, Brushes.DimGray, Brushes.Blue, 50);
    fvgIndicator = ICTFVG(Close, true, NinjaTrader.NinjaScript.Indicators.Gemify.FVGPeriodTypes.Minute, 5, 1000, true, 10, 1.1, 0.01, NinjaTrader.NinjaScript.Indicators.Gemify.FVGFillType.CLOSE_THROUGH, true, false, Brushes.Maroon, Brushes.Maroon, Brushes.DarkGreen, Brushes.DarkGreen, 13, 4, true, NinjaTrader.NinjaScript.DrawingTools.TextPosition.TopRight, new SimpleFont("Verdana", 12) { Bold = false, Italic = false }, Brushes.WhiteSmoke, Brushes.DimGray, Brushes.Blue, 50);
    SetTrailStop(@"5", CalculationMode.Percent, 0, false);
    SetProfitTarget(@"20", CalculationMode.Ticks, 0);
    }
    }
    
    protected override void OnBarUpdate()
    {
    // Check for FVG conditions and implement your strategy logic here
    if (fvgIndicator != null && fvgIndicator.FVGList.Count > 0)
    {
    // Access FVG data and information using fvgIndicator.FVGList
    // Implement your trading logic based on the detected FVGs
    // For example, you can enter long or short positions when specific FVG conditions are met.
    }
    }
    
    
    #region Properties
    [NinjaScriptProperty]
    [Range(1, int.MaxValue)]
    [Display(Name="Parameter", Order=1, GroupName="Parameters")]
    public int Parameter
    { get; set; }
    #endregion
    
    }
    }
    ​
    I have this code for my strategy but whenever I try to reference the FVGlist ( I see the FVGs on the chart) the list is empty....what am I doing wrong?
    using the above code as a starting point, how would one go about checking to see if a FVG was just created on the most recently closed bar? Is there a better way then checking the fvgList?

    Leave a comment:


  • tickets2themoon
    replied
    Originally posted by sierrajpr View Post
    I have this code for my strategy but whenever I try to reference the FVGlist ( I see the FVGs on the chart) the list is empty....what am I doing wrong?
    The List fvgList is currently set to private. You can attempt to change the code and modify the list to be public on line 76:

    Code:
    public List<FVG> fvgList = new List<FVG>();
    Then you should be able to access the list using fvgIndicator.fvgList

    Leave a comment:


  • ArbTrader
    replied
    gemify Great indicator and I use it everday. Trying to extract values of FVG from chart using ChartToCSV and its not capturing the values. Is it possible to make it work? Thanks,
    This indicator will write all of the chart’s historical bar data and indicator data to a CSV type file that can then be imported into a spreadsheet. To use this indicator, add it to a chart and (critical) wait until all indicators have finished reloading (no longer shows (Calculating…)). Click the green button in the […]

    Leave a comment:


  • sierrajpr
    replied
    Code:
    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Gui.Tools;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;
    using NinjaTrader.NinjaScript.Indicators;
    using NinjaTrader.NinjaScript.DrawingTools;
    using NinjaTrader.NinjaScript.Indicators.Gemify;
    #endregion
    
    //This namespace holds Strategies in this folder and is required. Do not change it.
    namespace NinjaTrader.NinjaScript.Strategies
    {
        public class test : Strategy
        {
            private int Var;
    
            private NinjaTrader.NinjaScript.Indicators.Gemify.ICTFVG ICTFVG1;
            private ICTFVG fvgIndicator;
            protected override void OnStateChange()
            {
                if (State == State.SetDefaults)
                {
                    Description                                    = @"Enter the description for your new custom Strategy here.";
                    Name                                        = "test";
                    Calculate                                    = Calculate.OnBarClose;
                    EntriesPerDirection                            = 1;
                    EntryHandling                                = EntryHandling.AllEntries;
                    IsExitOnSessionCloseStrategy                = true;
                    ExitOnSessionCloseSeconds                    = 30;
                    IsFillLimitOnTouch                            = true;
                    MaximumBarsLookBack                            = MaximumBarsLookBack.TwoHundredFiftySix;
                    OrderFillResolution                            = OrderFillResolution.Standard;
                    Slippage                                    = 0;
                    StartBehavior                                = StartBehavior.WaitUntilFlat;
                    TimeInForce                                    = TimeInForce.Gtc;
                    TraceOrders                                    = false;
                    RealtimeErrorHandling                        = RealtimeErrorHandling.StopCancelClose;
                    StopTargetHandling                            = StopTargetHandling.PerEntryExecution;
                    BarsRequiredToTrade                            = 40;
                    // Disable this property for performance gains in Strategy Analyzer optimizations
                    // See the Help Guide for additional information
                    IsInstantiatedOnEachOptimizationIteration    = true;
                    Parameter                    = 1;
                    Var                    = 1;
                }
                else if (State == State.Configure)
                {
                    AddDataSeries("ES 09-23", Data.BarsPeriodType.Minute, 5, Data.MarketDataType.Last);
                }
                else if (State == State.DataLoaded)
                {                
                    ICTFVG1                = ICTFVG(Close, true, NinjaTrader.NinjaScript.Indicators.Gemify.FVGPeriodTypes.Minute, 5, 1000, true, 10, 1.1, 0.01, NinjaTrader.NinjaScript.Indicators.Gemify.FVGFillType.CLOSE_THROUGH, true, false, Brushes.Maroon, Brushes.Maroon, Brushes.DarkGreen, Brushes.DarkGreen, 13, 4, true, NinjaTrader.NinjaScript.DrawingTools.TextPosition.TopRight, new SimpleFont("Verdana", 12) {Bold = false, Italic = false}, Brushes.WhiteSmoke, Brushes.DimGray, Brushes.Blue, 50);
                    fvgIndicator = ICTFVG(Close, true, NinjaTrader.NinjaScript.Indicators.Gemify.FVGPeriodTypes.Minute, 5, 1000, true, 10, 1.1, 0.01, NinjaTrader.NinjaScript.Indicators.Gemify.FVGFillType.CLOSE_THROUGH, true, false, Brushes.Maroon, Brushes.Maroon, Brushes.DarkGreen, Brushes.DarkGreen, 13, 4, true, NinjaTrader.NinjaScript.DrawingTools.TextPosition.TopRight, new SimpleFont("Verdana", 12) { Bold = false, Italic = false }, Brushes.WhiteSmoke, Brushes.DimGray, Brushes.Blue, 50);
                    SetTrailStop(@"5", CalculationMode.Percent, 0, false);
                    SetProfitTarget(@"20", CalculationMode.Ticks, 0);
                }
            }
    
            protected override void OnBarUpdate()
            {
                // Check for FVG conditions and implement your strategy logic here
                if (fvgIndicator != null && fvgIndicator.FVGList.Count > 0)
                {
                    // Access FVG data and information using fvgIndicator.FVGList
                    // Implement your trading logic based on the detected FVGs
                    // For example, you can enter long or short positions when specific FVG conditions are met.
                }
            }
    
    
            #region Properties
            [NinjaScriptProperty]
            [Range(1, int.MaxValue)]
            [Display(Name="Parameter", Order=1, GroupName="Parameters")]
            public int Parameter
            { get; set; }
            #endregion
    
        }
    }
    ​
    I have this code for my strategy but whenever I try to reference the FVGlist ( I see the FVGs on the chart) the list is empty....what am I doing wrong?

    Leave a comment:


  • sierrajpr
    replied
    I figured it out. Thanks!

    Leave a comment:


  • sierrajpr
    replied
    Question: If I want to use this indicator in a combination with another strategy....Can I do that? It doesn't show up in the strategy builder wizard thingy when you go to create a strategy. Can I reference it manually? Is that possible? Thanks!

    Leave a comment:


  • JasonX
    replied
    Thank you for the ingenious indicator.
    I would like to be able to choose the thickness of the line of the rectangle.

    Thank you very much!​

    Leave a comment:


  • tickets2themoon
    replied
    Originally posted by Creamers View Post
    Great work,

    Got a question about the release note:
    • Optimization for FVG display (how far to the right the gaps are displayed)
    Is there an option that I miss or how to set the total bar to the right that are displayed?
    In previous versions the endpoint of new FVG rectangles were set to 50 years out. This was modified to be the starting time of the FVG plus the number of days currently displayed on the chart.

    Leave a comment:


  • Creamers
    replied
    Great work,

    Got a question about the release note:
    • Optimization for FVG display (how far to the right the gaps are displayed)
    Is there an option that I miss or how to set the total bar to the right that are displayed?

    Leave a comment:


  • jjs12
    replied
    Nice work...

    A couple things that would likely be very useful here...

    1-Allow the indicator to include a start time, this would allow a user to disregard the overnight, or certain periods. Less noise in the intraday if someone is figuring where one of these is coming from.
    2-Add an option for the indicator to expire at the close... That way for a super small timeframe they won't extend in to the next day...


    Take care

    Leave a comment:


  • alessandroalbolino
    replied
    Hello,

    This indicator is very useful. I would like to suggest an improvement. This ICT concept is based only looking at the price, I would like to filter the highlighted FVG also by volume. Not all the FVG that would be marked based on only price are good. I think two parameters that should be add to filter the fvg are the Delta % of the bar (let s say that at least a 10% of buy/sell represent a good partecipation) and the stacked imbalance inside that bar that if present in the fvg bar represent an even stronger area for reaction. Is it possible to add that? The fvg bar in the example with the stat box down is an example of a good fvg bar
    Click image for larger version

Name:	image.png
Views:	1755
Size:	40.1 KB
ID:	1249031

    Leave a comment:


  • Shakar
    replied
    This is a great indicator. Thanks! How would one go about automating entries based on this indicator? I'm looking at something like the following.

    1. If above the moving average and a bullish FVG is formed, enter a buy limit order ## ticks above the FVG upper price using the current ATM strategy.
    2. If below the moving average and a bearish FVG is formed, enter a sell limit order ## ticks below the FVG lower price using the current ATM strategy.

    Thanks!

    Leave a comment:


  • dj22522
    replied
    Pooloftraders
    What is the difference between 2.2 and 2.3?​
    Best to read through the release notes. I'm not sure about v0.0.2.2 but the latest v0.0.2.3 is listed there.

    https://github.com/OrderFlowTools/ICTFVG/releases
    Last edited by dj22522; 04-08-2023, 03:21 AM.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CaptainJack, 05-29-2026, 05:09 AM
0 responses
414 views
0 likes
Last Post CaptainJack  
Started by CaptainJack, 05-29-2026, 12:02 AM
0 responses
275 views
0 likes
Last Post CaptainJack  
Started by charlesugo_1, 05-26-2026, 05:03 PM
0 responses
235 views
1 like
Last Post charlesugo_1  
Started by DannyP96, 05-18-2026, 02:38 PM
1 response
322 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
280 views
0 likes
Last Post CarlTrading  
Working...
X