Need Sorted PipCount Range per Rolling x Number of Candles

rebeljedi
Trader
Posts: 87
Joined: Mon Nov 21, 2011 4:17 am

Need Sorted PipCount Range per Rolling x Number of Candles

Post by rebeljedi »

Hi,
I have been trying unsuccessfully to locate an indicator that can provide the following:

per rolling (real time) x number of candles (where x can be 1000 candles) on timeframe y (where y can be H4), it shows sorted pipcount range like this on Empty4 screen:

Current Candle Range: number of pips, percentage
Range 100-999pips, # of candles in this category, percentage of such candles in this category
Range 90-99pips, # of candles in this category, percentage of such candles in this category
Range 80-89pips, # of candles in this category, percentage of such candles in this category
Range 70-79pips, # of candles in this category, percentage of such candles in this category
Range 60-69pips, # of candles in this category, percentage of such candles in this category
Range 50-59pips, # of candles in this category, percentage of such candles in this category
Range 40-49pips, # of candles in this category, percentage of such candles in this category
Range 30-39pips, # of candles in this category, percentage of such candles in this category
Range 20-29pips, # of candles in this category, percentage of such candles in this category
Range 0-19pips, # of candles in this category, percentage of such candles in this category

If anyone can point me to a link, that will be great.
Or if any coder can code this if this is not available, that will be great too!

Thank you.
rebeljedi
Trader
Posts: 87
Joined: Mon Nov 21, 2011 4:17 am

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by rebeljedi »

The closest I have found was a Empty4 EA that exports streaming historical data from Empty4 to simple Excel or text files, and it continuously updates in real time.

http://www.Empty4-mq4-expert-advisor-download.com/
rebeljedi
Trader
Posts: 87
Joined: Mon Nov 21, 2011 4:17 am

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by rebeljedi »

Will probably need a script (Extract Empty4 data), an excel sheet (crunch the data) and an indicator (extract from excel and display on Empty4) to reflect the rolling piprange values on Empty4.

The easiest Empty4 data extraction script I have seen so far is created by gilani from ff.
See enclosed script.

The script creates a csv file under the <files> folder in your broker program files. This file can be opened by MS Excel. H1 files are created for selected pairs and it has a nice message to let you know that it has finished extracting.
You do not have the required permissions to view the files attached to this post.
Last edited by rebeljedi on Tue Jul 03, 2012 12:22 pm, edited 1 time in total.
rebeljedi
Trader
Posts: 87
Joined: Mon Nov 21, 2011 4:17 am

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by rebeljedi »

So why look at this request?

1. Trying to interest those of us who think statistical trading is possible with forex.
2. There are 2 ways to trade using this information - breakout and range using specific timeframes.
garyfritz

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by garyfritz »

rebeljedi wrote:Will probably need a script (Extract Empty4 data), an excel sheet (crunch the data) and an indicator (extract from excel and display on Empty4) to reflect the rolling piprange values on Empty4.
Unless I completely misunderstand you, that wouldn't be necessary. An Empty4 indicator could easily scan back through the last N bars and collect / calculate / display the info you're talking about. You just want the summary data displayed for the last N bars in the chart, right? So the summary always applies only to the last N bars, and e.g. there's no way to see the summary as of M bars ago?

Unfortunately I don't have the bandwidth to volunteer to do it!

What type of statistical trading are you envisioning? If you explain it, I might be able to test something in Tradestation -- which I can do much faster/easier/better than I can in MQL.
rebeljedi
Trader
Posts: 87
Joined: Mon Nov 21, 2011 4:17 am

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by rebeljedi »

Hi garyfritz,

you are right, I am thinking of 1 Empty4 indicator that can do just that. Right now, I can only extract Empty4 data manually and calculate the stats using MS Excel.

The ideas are culled from a seminar preview (which stated >70% accuracy) and are very much in the infancy stage as I am trying to deconstruct and improve the strategy. In order to further the ideas, I need to visually see the values and play with the indicator to construct the trading strategies. I gladly welcome your input and any others who view this topic.

Range trading using EURUSD M15:
possible trade alert comes from the piprange indicator that probably shows a decreasing %range,
works with 50pip range (piprange indicator probably shows it is highest probability),
with TP 20pips from buying support or selling resistance of the range, SL 20pips,
session based: likely london close-asian open hours
duration: 2hrs

Breakout trading using EURUSD D1:
possible trade alert comes from the piprange indicator that probably shows an increasing %range,
works with 50pip range,
with TP 20pips breakout outside the 50pip range,
session based: likely london hours

If anyone can further refine these ideas, please share yours. Thank you.
Last edited by rebeljedi on Wed Jul 04, 2012 3:35 am, edited 1 time in total.
garyfritz

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by garyfritz »

That turns out to be pretty straightforward in TS. I knocked out a quick-and-dirty in about 10 minutes. Here's a sample of the indicator, showing the counts through time. E.g. at the moment about 190 of the last 1000 EURUSD bars have a range of 20-30 pips (white) or 30-40 pips (light gray). The # of 20-30 bars has roughly doubled since the start of the year.
PipRanges.gif
Is that the kind of info you wanted?

You'd want the ranges to be adaptive depending on the chart. This is an H4 chart (240 minute). On a D1 chart, most bars have > 100 pip range, and on an H1 chart most are < 30 pips.
You do not have the required permissions to view the files attached to this post.
rebeljedi
Trader
Posts: 87
Joined: Mon Nov 21, 2011 4:17 am

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by rebeljedi »

Thanks garyfritz, yes, that's the info I want and yes, it should be adaptive to the chart.

Could you also add % to each value and make it into columns?
And could you also add a current range in pips and %?

Thank you.
garyfritz

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by garyfritz »

Try this: you specify the "100% value" of range. (I was going to pick one based on ATR, but I can't automatically use the ATR at the END of the chart, and the ATR at the START of the chart changes based on how long the chart is.)

I plot the lines as shown above, but now the lines represent < 20% * "100% value," 20-30%, 30-40%, etc. And each line's value is a % of the total, instead of a count. Then I can dump those lines to a spreadsheet:
Range.gif
So for this chart, the "100%" range value was 300 pips. On 7/2/12 (my local time, GMT-6), 1.1% of the last 1000 bars were < 20% * 300 pips, 9.7% were 20-30%, etc. 5.5% were greater than the "100% value" of 300 pips. The range of the 7/2/12 bar was 109.3 pips, which is 36.4% of the 300-pip standard value.
You do not have the required permissions to view the files attached to this post.
rebeljedi
Trader
Posts: 87
Joined: Mon Nov 21, 2011 4:17 am

Re: Need Sorted PipCount Range per Rolling x Number of Candl

Post by rebeljedi »

Thanks for sharing your ATR perspective. Can we consider setting 5-day average as 100%ATR?

On another perspective, I am thinking about number of candles divided by total number of candles analysed.
For instance, if there are 400 such candles falling in 50-59 pips category out of 1000 candles analysed, then the calculation is 400/1000 = 40%.
Post Reply

Return to “Indicators”