OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniScripts
Intraday Extremes: N-bar, Daily, Weekly & Monthly
Last Activity 12/22/2017 12:33 AM
8 replies, 1373 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : Intraday Extremes: N-bar, Daily, Weekly & Monthly
Posted : 2/11/2009 4:47 AM
Post #11486

This code is designed to efficiently calculate and plot a collection of prior-extreme High's and Low's based on a chart using Intraday realtime bars.

Please note: the code has been developed on a machine that does not have intraday RT feed available, so it MAY NOT WORK. I'd much appreciate someone with intraday feed, and who also has some programming experience, to please test this code and give me some useful feedback.

This project was originally started to demonstrate something pretty simple ... how to determine the highest H and lowest L during the course of a day, without using HHV and LLV, so that the calculations go faster.

Then it grew ... and grew ... for "fun" (yep I know I'm wierd). I decided to provide enough "timeframe multiples" to honor Alex Elder's multiple-timeframe concepts ... he recommends an approx factor of five between each successive level, using at least three levels.

That is, if the base level is one day, then the next would be one week, and the next would be one month.

Or, if the base level is ten minutes, then the next would be one hour, and the next would be one day.

Or, all of the above. You could go further with it, starting with a 2 minute or 30 second or 5 second base, but that kind of extreme daytrading is, I believe, outside of the scope of Elder's concepts ... the world revolves around floor / Camarilla pivot levels much more than multiple-of-five tiered concepts.

This code actually permits you to plot five such levels, if you want (first level is shown by setting your intraday bar to ten min, the second by setting your Nbar value to 6) ... and it allows you some very flexible definitions of what a "week" is (either arbitrarily starting on a given day of the week, or a running 5-trading-day "week"), as well as flexibility re what a "month" is (either a calendar month starting on the 1st, or an expiration-Friday month, starting the Monday after the third Friday of the month.

If nothing else, it will provide a useful template for study as to how such things can be programmed efficiently.

If anyone can suggest a more efficient means of writing this code, I'd like to hear about it ... that's half the reason I wrote it. By "efficient", I refer to the time it takes the computer to make and plot the calculations.

Again - caution - this code has not been tested in an intraday-feed environment. It DOES compile without error, fwiw.


[Edited by Jim Dean on 2/11/2009 4:55 AM]

Attached file : aJDndMultiTimeFrameExtremes.rtf (8KB - 287 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 2/11/2009 8:16 AM
Post #11487 - In reply to #11486

OK here is a small revision.

Minor fix to one of the param's ... should not change execution.

Plot statements re-sequenced and re-colored, with fat lines for long periods, gradually skinnying down for shorter periods. Rationale: sometimes the lines overlap. By plotting the shorter, skinnier ones AFTER the longer, fatter ones, you can see the "stacking" on the screen.

Apparently the code DOES work intraday ... a couple of people have checked (thanks, Greg and Jim!) ... but no one as yet has had time to see if it's actually WORKING right.

Tests should include:
1. check with 10min bars, and Nbar set to 6 (for each hour)
2. check with week set to day 3 and also to -1 (continuous)
3. check with month set to 1 (calendar) and 2 (expiration Fri)
4. check what happens at the BEGINNING of the plotted history

Thanks for your help!

Attached file : aJDndMultiTimeFrameExtremes.rtf (8KB - 247 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 2/11/2009 12:14 PM
Post #11491 - In reply to #11487

Once someone has downloaded and run the updated file in the prior posting, please email me (hvacsage@yahoo.com) a couple of png snapshots of the stairstep settings and the dynamic settings (similar to what I posted in the EOD version). Thanks!
^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 2/11/2009 2:48 PM
Post #11494 - In reply to #11491

Ooops ... my mistake.

In the last upload of the Intraday indicator, I had accidentally copied the EOD version into the file instead.

This is the correct one. Also, I edited the other posts and put this one in place of the old ones.

I'm sorry to any of you (esp Greg and Jim) who've been messed up by this.



[Edited by Jim Dean on 2/11/2009 2:50 PM]

Attached file : aJDndMultiTimeFrameExtremes.rtf (8KB - 208 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 2/11/2009 3:25 PM
Post #11495 - In reply to #11494

I've just found a logic error in the part of this that is activated with a -1 "dynamic" input for Weekly, so don't bother testing that yet. The other weekly "fixed" values of 1-5 should work OK.
^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 2/11/2009 3:55 PM
Post #11496 - In reply to #11495

OK, try this ... the -1 weekly hopefully should work.

Also, I added an extra parameter so you can turn off either or both the yesterday and today pairs of extremes.

I changed colors slightly for the today lines. I use a black background.



[Edited by Jim Dean on 2/11/2009 4:17 PM]

Attached file : aJDndMultiTimeFrameExtremes.rtf (9KB - 272 downloads)
Attached file : MultiTimeFrameExtremes - Color & Width.png (27KB - 402 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 2/11/2009 5:03 PM
Post #11498 - In reply to #11496

Still some significant problems reported.

I'll work on it further and post something that is better-tested, if my testers continue to be patient with me.

It's tricky to debug code when you can't test it yourself!

Thanks again, Greg and Jim!
^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 8/8/2013 10:00 PM
Post #22143 - In reply to #11498

Hi Jim,

Did you ever got to have the final code?

THanks
^ Top
Jim Dean

Sage
20001000100
Posts: 3111

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Intraday Extremes: N-bar, Daily, Weekly & Mont
Posted : 8/9/2013 5:02 AM
Post #22147 - In reply to #22143

Ancient history. I can't remember. Not enuf time avail now to ferret it out and test it. Sorry.

[Edited by Jim Dean on 8/9/2013 5:04 AM]

Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.