Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ICT Fair Value Gap

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

    #91
    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!

    Comment


      #92
      I figured it out. Thanks!

      Comment


        #93
        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?

        Comment


          #94
          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 […]

          Comment


            #95
            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

            Comment


              #96
              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?

              Comment


                #97
                gemify

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

                Comment


                  #98
                  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.

                  Comment


                    #99
                    Hi, can anybody be so kind to help me out. I have to tell you I am having a ton of problems fixing all the errors I have in Ninja Editor, which I am not technical software person whatsoever.
                    I can not import the ICTFVG-v0.0.2.3 because of all the tons of errors. There are just too many errors and I am getting head ache fooling around with the Ninja Editor. I would really love to get this indicator into my NinjaTrader, it seems to be such a great tool! Would somebody be so kind, who knows a way I can import the ICTFVG-v0.0.2.3 files without go through the normal way of Importing files. If you know how, would you please send me exact details instructions how to do so! You will be so greatly appreciated!! Sincerely yours always, Andrewsforex.

                    Comment


                      you need to post screenshot of errors you are facing...

                      Comment


                        Hi tkaboris, like I was mentioning earlier, there are a TON of errors and it took me a good while to SnagIt the Errors. So I am not sure how the Capture will look here, but
                        here it is anyway. Hope you can help! Appreciate it! Andrewsforex programming errors in NinjaScript - NinjaEditor.pdf

                        Comment


                          I don't know if you got the copies of the files Tkaboris, but here I try again.
                          Attached Files

                          Comment


                            Anyway to make this work with PnF Charts? gemify

                            Comment


                              Originally posted by JasonX View Post
                              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!​
                              Yes, that would be ideal!
                              I found one more thing there - the Filed Area color does not correspond to the selected settings.
                              I took a screenshot of this error. And also presented what this indicator would look like with the correct color and thin and transparent Borders. In the main settings, I made the Area less transparent for clarity.
                              And the indicator is great! You can use it to create your own trading strategy! Thanks to the author!​
                              Attached Files
                              Last edited by Nikolaibalt; 11-05-2023, 03:47 AM.

                              Comment


                                Hello. gemify Thank You for this indicator it is amazing. One question.... Is there anyway to have it Flag the Order Block candle before the FVG when they print on the very next candle? That would change the game. There is a trading view indicator that does this and I would LOVE if we could edit yours in this manner. Please and Thank You.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                602 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                347 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                103 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                559 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                558 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X