NexusFi: Find Your Edge


Home Menu

 





How to predict a surge in volatility on ES, NQ?


Discussion in Emini and Emicro Index

Updated
    1. trending_up 878 views
    2. thumb_up 2 thanks given
    3. group 6 followers
    1. forum 1 posts
    2. attach_file 2 attachments




 
Search this Thread

How to predict a surge in volatility on ES, NQ?

  #1 (permalink)
MasterYan
San Francisco, CA
 
Posts: 30 since Jul 2016
Thanks Given: 13
Thanks Received: 4

How to predict a surge in volatility on ES, NQ?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
Quant vue
Trading Reviews and Vendors
REcommedations for programming help
Sierra Chart
 
  #2 (permalink)
 BERN Algos 
Bologna Italy
 
Experience: Advanced
Platform: nt8
Broker: NinjaTrader
Trading: futures
Posts: 42 since Jun 2022
Thanks Given: 11
Thanks Received: 38


MasterYan View Post
How to predict a surge in volatility on ES, NQ?

Well, don't know how to predict. But you may analyze potential bias instead.
The attached code exports bar size in the output window of NT, if you're familiar with that.
Once you have copy&paste data on an excell spreadsheet, you can play with a pivot table.

As an example, I exported 12 years of ES, 15 min barsize.
The first attached pictures shows average hourly results for ES (sorry, using my local PC set on Italian time UCT +7), for weekly days from Sunday (1) to Friday (6).
Everything is more or less as expected: high volatility at opening time, low volatility in the night, etc. Btw, just to say, in the second picture you see a nice spot on Wednesday afternoon (13.15 UCT), that seems quite persistent during the years.



 
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;
#endregion

//////////////////////////////////////////////////////////////////////////////////////////////////
// ExportBarSize - by BERN ALGOS - December 2022 - Rev01
//
// How to use it:
// - Open the strategy analyzer and the output window 
// - Select instrument and time window 
// - Recommended timeframe is 15 minutes
// - Run 
// - Click on the output window and press CNTR + A to select all, than copy with CNTR + C 
/////////////////////////////////////////////////////////////////////////////////////////////////////

namespace NinjaTrader.NinjaScript.Strategies
{
	public class ExportBarSize : Strategy 
	{
		
		protected override void OnStateChange()
		{
			if (State == State.SetDefaults)
			{
				Description= @"ExportBarSize on output window";
				Name		= "ExportBarSize";
				Calculate	= Calculate.OnBarClose;
				TimeInForce = TimeInForce.Gtc;
			}
		}
		

		protected override void OnBarUpdate()
		{
				Print(Time[0] + "," + (High[0]-Low[0]));
		}
	}
}
Hourly


Quarterly

Reply With Quote
Thanked by:




Last Updated on December 20, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts