Jump to content

Power levels trading


Recommended Posts

Looks great guys... in support of the current decisions about the indicator, and after using the original indicator since the beginning, I did notice that total put open interest and call open interest foretells the future direction of the market. Thank you for your hard work.

 

Carl

MarketCycle-360.com
Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Tpo

 

Before I finish the OBEL (Options break-even levels) indicator here is something what you might find interesting and perhaps useful to use together with OBEL: TPO (time price opportunity) indicator. Basically what it does is showing the areas where the price was most often in given period of time.

 

On the picture you can see a silver dash line indicating the TPO levels calculated from the last 7200 minutes (5 days) and a gray dot line showing the same from the last 1440 minutes (1 day):

http://imageshack.us/a/img72/4526/optionstpo.png

 

It's taken from here: http://fxcoder.ru/indicators/tpo, all credit goes to the russian guy, I just changed the defaults and added an option to show a trendline instead of just a simple horizontal line so the line is only as long as is the data segment that it uses for calculation. You can get the modified version from here: http://pastebin.com/dKSCxm7H. When attaching multiple instances of TPO to the same chart keep in mind that the "Id" variable must be different for each instance.

Edited by udc
Link to comment
Share on other sites

OBEL v1.00 + OBEL engine v1.00

 

Here goes the first public version of OBEL (Options break-even levels).

 

I separated it into two parts: an expert advisor "OBEL-engine" and an indicator "OBEL". The reason being, compared to the scripts and expert advisors the MT4 indicators are not multi-threaded. Instead, they all run in the same thread as the main program. This is quite dangerous as every computing-intense piece of code can virtually freeze the whole Metatrader. Now, even though the whole downloading/processing/saving cycle takes less than 10 seconds per instrument even those few seconds may be crucial if you just at that moment want to close a position, let alone a rare case when due to some kind of timeout (harddisk, network, remote CME server) the program would hang for a longer period or even indefinitely. Therefore I've made this part of the code in the form of expert advisor to stay safe. So what you need to do is simply to attach the EA to any chart, no matter of what symbol.

 

 

OBEL-engine

 

 

Description

 

OBEL-engine is an MT4 expert that at given interval periodically downloads and processes CME Options settlement data from the following web pages:

 

http://www.cmegroup.com/trading/fx/g10/australian-dollar_quotes_settlements_options.html

http://www.cmegroup.com/trading/fx/g10/british-pound_quotes_settlements_options.html

http://www.cmegroup.com/trading/fx/g10/canadian-dollar_quotes_settlements_options.html

http://www.cmegroup.com/trading/fx/g10/euro-fx_quotes_settlements_options.html

http://www.cmegroup.com/trading/fx/g10/japanese-yen_quotes_settlements_options.html

http://www.cmegroup.com/trading/fx/g10/swiss-franc_quotes_settlements_options.html

 

The Options data is downloaded for the most recent trading day and the nearest month expiry, and if they differ also for the nearest quarter-month expiry. Within the processing the data is unified to the format CME maintains in the respective daily bulletin PDFs, then the break-even points are calculated (for an explanation see post #820), converted to the FX format if necessary (i.e. JPYUSD -> USDJPY) and finally stored locally as CSV. The filename convention is OBEL_symbol_date.csv (i.e. OBEL_EURUSD_2012.10.24.csv).

 

When the new data is downloaded, it is first compared to the previously gathered data and processed only if the data seems to differ. Due to the fact that CME web pages are dynamically generated it may happen that the webpage differs in the HTML code although the actual Options data does not differ. That's why there is a second level verification after the data is processed and when it turns out the data doesn't really differ the locally stored CSV files are not overwritten. Hence the log message "Possible new data gathered" followed by "No new data found".

 

OBEL-engine is quite talkative during its work, all its messages can be found in the experts log. Optionally the verbosity can be increased by enabling the GetHTML logging. Also, all the log messages can be completely turned off by another option.

 

At the first sight it may seem unreasonable to download the web pages repeatedly throughout the day as the Options settlement data is supposed to be published only once a day, but in fact according to the CME the data is published and republished repeatedly (preliminary version, final version) so instead of handling the timezones in order to determine what time of your local computer corresponds to the CST times I just let it do the downloading continuously to make sure that I have always the most recent data. In you are concerned about the amount of Internet traffic you can enable the GetHTMLverbose parameter and see how much data is actually downloaded in every cycle and adjust the RefreshEveryXminutes parameter to your needs.

 

Parameters

 

RefreshEveryXminutes (15) - the interval to download web pages (applies only when the whole process finishes with success; in case of any kind of error the process is repeated in 5 minutes).

GetHTMLverbose (false) - the option to show messages related to the downloading.

Silent (false) - the option to turn off all messages.

 

 

OBEL

 

 

Description

 

OBEL is an MT4 indicator that periodically reads the local CSV files and draws the lines according to its settings. You can choose whether to draw the break-even lines for the nearest month expiry, or the q-month expiry, or both. You can have lines of up to 5 different thicknesses and for each thickness you can set a different color, all that separately for Call type and Put type of lines. You can choose whether the selected colors will get their intensity adjusted based on the ratio of given OI compared to the maximum OI found and this intensity adjustment can be based on either linear or logarithmic function.

 

When determining what thickness and color should a level be drawn with, the first highest matching criteria will be used. For example, if MinOIforWidth1=300, MinOIforWidth2=1000 and MinOIforWidth3=2000, and given level has OI 1900, the Width2 parameters will be used.

 

Furthermore, you can choose whether or not to show the text description for each line and what this description should include. Also, you can choose whether the lines will be drawn on the background (beneath the chart candles) or foreground.

 

Last, but not least, you can choose whether you want the indicator to redraw the lines every time it checks the file, or only once it detects a new data. This can be useful if you for example want to temporarily move or even delete some line(s) just for a little while until the next file-check (RedrawOnlyWhenNewData is disabled), or for as long as no new data is found (RedrawOnlyWhenNewData is enabled).

 

Parameters (except the self-explanatory ones)

 

VariableColorsAdjust (1) - if UseVariableColors is enabled, this parameter determines the curve used for the color intensity calculation. Minimum value is 0.001 which results in a linear function where the intensity of a color is linearly proportional to the ratio of given OI to the max OI. Higher the value is, more the function becomes logarithmic so that even low OI lines will be visible.

RefreshEveryXminutes (5) - the interval to check the file for a possibly new data (applies only when the whole process finishes with success and the data found - regardless whether new or old - is relevant; in case the file does not exist or the data is not in the correct format the process is repeated in 1 minutes).

 

 

Download link:

http://mir.cr/WLANRJW0

http://www.directmirror.com/files/OPPR02QR

Link to comment
Share on other sites

Hello,

 

Is anyone else experiencing the following error with the EA which stops the EA from performing it’s task “OBEL-engine EURUSD,Daily: dll calls are not allowed; 'wininet.dll'-'InternetOpenA'”? Or know how I can correct it? I have tried it with many different setting combinations all with the same result.

 

Thank You in advance,

Spazzy

Edited by spazzy252
Link to comment
Share on other sites

Is anyone else experiencing the following error with the EA which stops the EA from performing it’s task “OBEL-engine EURUSD,Daily: dll calls are not allowed; 'wininet.dll'-'InternetOpenA'”? Or know how I can correct it? I have tried it with many different setting combinations all with the same result.

 

You don't need to try any different setting combinations, just read the error: "dll calls are not allowed". Then allow them and you won't get that error.

Link to comment
Share on other sites

OBEL engine v1.01

 

Changes:

 

When OBEL-engine v1.00 is attached to a chart, it doesn't contain any data. Once the web pages are downloaded for the first time the extracted data is automatically assumed to be a new data (because there is no "old" data to be compared with) and thus the respective files are created or overwritten in case they already exist. Now if the latter is the case and the existing files already did contain the most recent data, they are unnecessarily overwritten with the identical data they already contain. It doesn't cause any harm but it's a little imperfection.

Therefore now v1.01, when attached to a chart, first checks whether the files already exist and if so their context is loaded into the engine's memory. That way the files are overwritten only when a really new data is gathered.

 

 

Download link: (contains both OBEL and OBEL-engine)

http://mir.cr/0IX6EXMV

http://www.directmirror.com/files/SHKGTXWU

Link to comment
Share on other sites

OBEL engine v1.02

 

Changes:

 

Bugfix - since the file names are based on the current date but OBEL-engine v1.01 creates a new file only when new data is detected, it may happen that the last time it saved the data was yesterday but now it's a new day but the respective CSV file with today's date doesn't exist yet (because no new data from the web was found yet). So if at this point the OBEL indi is attached to a chart (or restarted) it will show nothing.

Therefore now v1.02 will save the data to a file not only when new data is detected but also if the respective file for the current day doesn't exist (yet).

 

 

Download link: (contains both OBEL and OBEL-engine)

http://mir.cr/1PFKRUIM

http://www.directmirror.com/files/EHYQ36KH

Link to comment
Share on other sites

A strategy thought

 

Here is a strategy thought. You most probably already figured it out yourself, but here it is anyway, someone might find it useful.

 

People develop strategies around these levels, e.g. trading retraces or breakouts. But you may go a different way and instead use these levels simply as an additional filter in your existing strategies. What do we know about these levels? The price may react to them (it may bounce back, stall, or quickly break through them) or it may entirely ignore them.

So realistically speaking, there is a chance that the price will bounce back, or stall and then bounce back due to the loss of momentum. Now, if your existing strategy is based on very short trades, like scalping, and it tells you that right now it's a good time to open a position, but at the same time you see a level nearby in your direction, you may consider to pass and not open the position. It may, or may not, increase your winning rate.

Or, if the level is far enough you may open a position and use the area around the level as a target.

Also, it may be useful to set the MinOI parameter rather low (minimum is 1) for these purposes.

Link to comment
Share on other sites

Using price action (follow the Trend) along with some form of volume Indicator is a good strategy around these Levels.

:-)

 

Definitely, except you don't get that information in case of spot forex. The "volume" you get from your broker is a ticks volume, a mere number of times the price changed within given timeframe. On top of that a vast majority of brokers average quote stream, and each of them does it differently, so you get less ticks (thus lower ticks volume) than in reality.

 

If you are thinking that ticks volume is the same as the real volume then you would be wrong, just because something looks similar doesn't mean it is the same. People (including those various pseudo-experts) very often confuse similar look with correlation. Correlation must involve dependency otherwise it's not correlation. There is no dependency between the ticks volume and the real volume. It's the same as if you said that every time you go to work it's daylight therefore it's daylight because you go to work. No, it's not. Neither it's true the other way around - you don't go to work because it's daylight. Those are 2 independent events that just often happen to occur at similar times.

 

If you are referring to Gavin Holmes (of the VSA theory) who is rather aggressively trying to persuade people that the spot ticks volume is the same as the currencies futures volume, or if you simply want to guess spot volume by looking at currencies futures volume, then you would be wrong again as the currencies futures and anything what is happening on that market have no direct influence whatsoever on spot forex for the simple fact that the currencies futures quote is derived from the spot forex quote. The exact CME formula is: currencies futures quote = spot forex quote +- forward points. First the spot forex quote happens, then it is replicated onto the currencies futures market. So any kind of typical futures analysis (DOM, market profile, volume) is entirely nonsense in case of currencies futures and can not predict or assume anything because currencies futures quote changes when, and only when, the spot forex quote changes.

 

 

Of course all those scammers who are trying to sell you books, webinars, various subscriptions, software, systems and whatnot will not tell you any of this. Although some of them are getting more careful these days. Typically during a seminar presenting some amazing futures software or strategy etc. an obvious question arise: "will this work on forex as well?" and the presenter instead blatant "yes, of course" often these days answers something like "well, I don't know forex, I don't trade it, but I don't see why it shouldn't work". So they just purposely play s.t.u.p.i.d, which is a good strategy actually because it helps them protect themselves against false-advertising lawsuits.

Link to comment
Share on other sites

Maybe you should also make it clear you don't trade and your advice may be as bad as that of the seminar presenter. Stop giving bad advice or make it clear you don't trade and that you are just a programmer in each of those confusing posts.

 

Typically during a seminar presenting some amazing futures software or strategy etc. an obvious question arise: "will this work on forex as well?" and the presenter instead blatant "yes, of course" often these days answers something like "well, I don't know forex, I don't trade it, but I don't see why it shouldn't work". So they just purposely play s.t.u.p.i.d, which is a good strategy actually because it helps them protect themselves against false-advertising lawsuits.
Link to comment
Share on other sites

OBEL v1.01

 

Changes:

 

Just a visual improvement - now you can selectively choose from the following list what information you want to see in the description:

 

- Options trade date

- Options expiry month

- type of the Option (call/put) of which the OBEL is calculated

- OBEL price

- prior day OI

- estimated volume

- original Strike and Settle values (in round brackets)

 

You can display any combination of those, or you can of course choose to not display any description at all.

 

 

Download link: (contains both OBEL and OBEL-engine)

http://mir.cr/MX6KASA9

http://www.directmirror.com/files/1II6HTNT

 

 

This is probably as good as it gets using the information from the CME website. It's not perfect, though, because they show there the OI information 1 day older than the Settle value. For example, if the most recent closed trading day is 2012-10-29 then the website shows the Settle from 2012-10-29 but the OI from 2012-10-28 (hence "prior day OI"). So if you are using MinOI filters you are in fact filtering Settle levels from yesterday by the OI values these levels have got the day before yesterday.

 

Now, why doesn't CME show OI values from the same day as the Settle values? I suspect they do it on purpose to make it harder for people to utilize these information via automated processing. Because at the same time the website is updated they also publish the daily bulletin package in the form of PDF files and there they do show the OI values from the same day as the Settle values. So it just must be malice on their side and it's a s.t.u.p.i.d one actually because extracting information from a PDF is not fundamentally difficult, it's just a little bit more inconvenient. If I happen to have enough time to do that (unfortunately not anytime soon) I may just do that, it will have to be a standalone solution, though, it will process all utilizable PDF files from the package (that will make spazzy252 happy as he wanted to use the OBEL values for other instruments and on different trading platforms) and it will produce CSV files the same way as the MT4's OBEL-engine does now.

Link to comment
Share on other sites

""Looks great guys... in support of the current decisions about the indicator, and after using the original indicator since the beginning, I did notice that total put open interest and call open interest foretells the future direction of the market. Thank you for your hard work.

 

Carl ""

 

Dear UDC

Thank you.

can u do this total call and put Oi display separate side in chart.with 5 or more days one by one.

any new developed put/call level i mean its brand new level with golden glow paint.

any level(price) with increasing/digressing vol/oi are mark some symbols,which we know at that price getting strong or weak.

if the price touch the level more then two time then that level must go hallow line,if price halt that level then that level not going to impact any more so that level must disappear.

Sorry for asking to much

once again thank you

Fxnizar

Link to comment
Share on other sites

""Looks great guys... in support of the current decisions about the indicator, and after using the original indicator since the beginning, I did notice that total put open interest and call open interest foretells the future direction of the market. Thank you for your hard work.

 

Carl ""

 

Dear UDC

Thank you.

can u do this total call and put Oi display separate side in chart.with 5 or more days one by one.

 

I see what you mean - if the overall OI in calls is rising that might indicate the price will go up and vice versa? Well, from CME website I can get data from 5 most recent days so what you are asking is possible. Something like this (volume in round brackets):

 

       10/24/2012   10/25/2012    10/26/2012    10/29/2012    10/30/2012
Calls    100 (10)     200 (20)      300 (30)      400 (40)      500 (50)
Puts     100 (10)     200 (20)      300 (30)      400 (40)      500 (50)

 

Actually it may be even better to show this info in a form of a mini chart. I will think about this.

 

any new developed put/call level i mean its brand new level with golden glow paint.

any level(price) with increasing/digressing vol/oi are mark some symbols,which we know at that price getting strong or weak.

if the price touch the level more then two time then that level must go hallow line,if price halt that level then that level not going to impact any more so that level must disappear.

 

This one is not that simple. You look at the OBELs, but what you should actually see is what is behind them, how they are calculated.

For example, you see OBEL at 1.3014 but what you are really seeing is Call Strike at 1270 + Settle at 31.4. Next day this very same 1270 Strike may have Settle at 25 so it will become OBEL 1.2950. Is this a new OBEL or the same OBEL that just moved? Also, this next day you can have another Option, 1280 Strike with Settle 41.4 this time, that will actually become OBEL at 1.3014, that is the same price level as the OBEL from the previous day. But is it the same OBEL as that one? It's a different Strike with a different Settle that just happened to end up at the same place. So how would you want to distinguish what level is a new level? There are no new levels, there is the same number of levels but they are just constantly moving according to their respective Settle values and based on their OI they are filtered out so you don't see them.

Link to comment
Share on other sites

OBEL engine v1.03 & OBEL v1.02

 

Changes:

 

OBEL-engine

 

When a new data is grabbed from the CME website and saved to the local file, the previous file (if existed) is not overwritten anymore but renamed instead to filename_old1.csv (then filename_old2.csv, filename_old3.csv and so on). That way all versions of data gradually published on CME website through the day are preserved and separately saved locally. Also, the filetimes of the files are preserved during the renaming process so just by looking at given file's modified time you can tell when the data was downloaded.

A new additional information is grabbed and saved from the website: the "Last Updated 11/01/2012 06:00 PM" text (omitting the word "Last"). You can find it on the webpage just below the table and locally it's stored in CSV in the first line after the expiries.

 

OBEL

 

A new option to show the "last update" information in the description. If you can't see everything you've chosen to be shown in the description it's not a bug but Metatrader's limitation (the description text is limited to 62 characters) so you ought to select only what you really need to see. I changed the default setting accordingly (don't forget you can hover mouse over a line to see an additional information) but you can of course adjust it to your needs.

A new option to invoke an alert message when a new data is found in the local file.

 

 

Download link:

http://mir.cr/1YDR5UGN

http://www.directmirror.com/files/08UYYXPO

 

 

This will probably have to do for a while as I will have to rework the engine and unite all those arrays into 4-dimension ones to be able to effectively gather the data for all 5 recent days available from CME website, and then I will probably make a separate OBEL-statistics indi to show what crodzilla and fxnizar suggested. It will be neat, so stay tuned.

Link to comment
Share on other sites

Now here is a thought. Since I will be already getting and processing 5 days of data for the statistics purposes, I may as well use this data to draw 5 days history of OBELs. Now a little inconvenience with this is that if I draw the OBELs as a horizontal trendlines with a proper beginning and end where they belong (that is at the respective CME trading session) then, logically, the most recent part of a chart will have no lines in it (because that trading day is not over yet thus the Settle is not published yet thus no OBEL can be calculated and drawn yet). It will be the most truthful picture you can get but for the actual trading purposes it will be impractical because you will see no lines where you are actually trading. So I was thinking about solving this by making the most recent OBELs (from the last closed CME trading day) protracted by a dotted lines to the "now" point in the chart. I think I might be even able to emulate the thickness while still keeping the lines dotted.

 

What I am not sure about, though, is whether my assumption that OBEL calculated from the Settle of given CME trading session should be shown in that trading session is correct. It's all about this Settle value, where does it actually belong? CME calculates the Settle at the end of trading day. Does that Settle belong to that trading day? But it wasn't calculated until the day was over. Or does it belong to the next day? But there a new Settle is being calculated. Or does it belong only to that single moment in time when CME calculates it?

I think the most logical is to put it to the time period of the trading day for which the Settle is eventually calculated, based on the idea that the Option is traded during the day (presumably around what-will-become-the-Settle level; hence the relevance of the "fights" around the derived OBEL on the spot market) and then the Settle is calculated as the final price of the Option for given day. Would you agree with that view?

Edited by udc
Link to comment
Share on other sites

Ok...

 

Now here is a thought. Since I will be already getting and processing 5 days of data for the statistics purposes, I may as well use this data to draw 5 days history of OBELs. Now a little inconvenience with this is that if I draw the OBELs as a horizontal trendlines with a proper beginning and end where they belong (that is at the respective CME trading session) then, logically, the most recent part of a chart will have no lines in it (because that trading day is not over yet thus the Settle is not published yet thus no OBEL can be calculated and drawn yet). It will be the most truthful picture you can get but for the actual trading purposes it will be impractical because you will see no lines where you are actually trading. So I was thinking about solving this by making the most recent OBELs (from the last closed CME trading day) protracted by a dotted lines to the "now" point in the chart. I think I might be even able to emulate the thickness while still keeping the lines dotted.

 

What I am not sure about, though, is whether my assumption that OBEL calculated from the Settle of given CME trading session should be shown in that trading session is correct. It's all about this Settle value, where does it actually belong? CME calculates the Settle at the end of trading day. Does that Settle belong to that trading day? But it wasn't calculated until the day was over. Or does it belong to the next day? But there a new Settle is being calculated. Or does it belong only to that single moment in time when CME calculates it?

I think the most logical is to put it to the time period of the trading day for which the Settle is eventually calculated, based on the idea that the Option is traded during the day (presumably around what-will-become-the-Settle level; hence the relevance of the "fights" around the derived OBEL on the spot market) and then the Settle is calculated as the final price of the Option for given day. Would you agree with that view?

 

I think those levels will be contested for days-on-end, unless the fundamentals of the currencies change in a big way. It is my opinion that option levels as played by the major institutions are a longer term play than what you or I would think. It is also my opinion that the major players will scale in and out of certain levels adjusting to risk as they see fit. So, to protract those levels might be useful. The levels that your indicator show is very useful... another tool in the toolbox. If these things were cut-and-dry, we could all make tons of money on these levels, but they are not. There are some things that must be tried and experimented with to see if they are useful.

 

Carl

MarketCycle-360.com
Link to comment
Share on other sites

I think CME should really review all the information it publishes and try to unify it. In the header of any PDF daily bulletin it says:

 

INDIVIDUAL CONTRACT PRICE DATA FOR OPEN, HIGH, LOW, CLOSE AND SETTLEMENT PLUS CLEARED VOLUME FIGURES REFLECT CME REGULAR TRADING HOURS SESSION ONLY.

 

So ok, now we know that Settle belongs to the "regular trading hours" part of (just finished) trading session. But what are actually "regular trading hours"? When I look here: http://www.cmegroup.com/trading_hours/fx-hours.html they distinguish between "electronic trading" (17:00-16:00) and "open outcry" (07:20-14:00), but no mention of "regular trading hours".

Now, since we know that the Settle is published at 14:17, 14:30, 15:00, 15:20, 18:00 (see here: http://www.cmegroup.com/market-data/settlements/settlements-details.html) and "open outcry" ends at 14:00, I would take a wild guess that the "open outcry" is what they call as "regular trading hours". Am I right?

 

So the OBEL will be most faithful for the period of time between 7:20 and 14:00 of given trading session. That's less than 7 hours. The charts have 24 hours. I guess when drawing OBELs for all 5 days I will draw with solid lines 7:20-14:00 and dotted lines from 14:00 to 7:20 next day. And for the most recent trading day I will protract dotted lines from 14:00 up to "now". That way we will cover all 24 hours and at the same time we can identify the actual trading hours the Options were traded. Hope it makes sense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...