NexusFi: Find Your Edge


Home Menu

 





PRINT "PM" session high/low and vol


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Big Mike with 2 posts (0 thanks)
    2. looks_two ptcm with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Doctor Leo with 1 posts (0 thanks)
    1. trending_up 4,069 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

PRINT "PM" session high/low and vol

(login for full post details)
  #1 (permalink)
 ptcm 
Taiwan
 
Experience: Intermediate
Platform: MC
Posts: 77 since Jun 2010
Thanks Given: 8
Thanks Received: 17

I am trying to print the PM session's HIGH and LOW and in turn find out the volatility of the PM session.

but the HIGH i got includes the HIGH in the AM session. Is there a shortcut keyword to get the PM session HIGH/LOW ?

If not, how could I modify my codes to get the PM HIGH/LOW in order to print the volatility for the PM session ?

many thanks...


vars:

myHigh (0),

myLow (0),

myPMvol (0);



if time > 1430 AND time <1630 then begin


if H > myHigh then myHigh = H;

if L < myLow then myLow = L;

myPMVol = myHigh-myLow;


end;


if time = 1615 then begin

Print("date: ", date, " time: ", time, " myHigh ", myHigh, " myLow ", myLow, " myPMvol ", myPMvol);

end;

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
Request for MACD with option to use different MAs for fa …
NinjaTrader
ISO Equity Curve Indicator
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
IQFeed MBO data experience
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
GFIs1 1 DAX trade per day journal
27 thanks
Diary of a simple price action trader
23 thanks
Supertradersams Thread Journal on NQ/MNQ
21 thanks
Daytrading ES & NQ
18 thanks
Tao te Trade: way of the WLD
18 thanks

(login for full post details)
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,232 since Jun 2009
Thanks Given: 33,103
Thanks Received: 101,341


You might try resetting it once per day:

 
Code
                            


if date <> date[1then begin

 myHigh 
H;
 
myLow L;

end
So that on a new day it will reset. You could get more granular by changing date to a Session start/end time depending on your exact needs.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #4 (permalink)
 ptcm 
Taiwan
 
Experience: Intermediate
Platform: MC
Posts: 77 since Jun 2010
Thanks Given: 8
Thanks Received: 17

if date <> date[1] then begin

myHigh
= H;
myLow = L;

end;

I've tried that. The problem is that whenever the AM session high > PM session high, MyHigh is giving me the AM session HIGH.
How could I get the PM session high/low ? I've looked up the TS code manual. There's no such thing as Session High/Low.

I am trying to isolate each session's volatility and measure the serial correlation in order to get a better idea as to whether the next session is gonna be high or low vol environment.


The HSI futures trading hours are the followings:

9:45-12:30
14:30-4:15



Started this thread Reply With Quote
(login for full post details)
  #5 (permalink)
Doctor Leo
St. Petersburg, Russia
 
Posts: 30 since Nov 2010
Thanks Given: 6
Thanks Received: 19

Why not trying the following:


if time = 1630 then begin
session_high = highest(high, N);
session_low = lowest(low, N);
end;

where N is the number of bars which constitute the session. Please note that you should use "time = 1630" and not "time < 1630" as time here refers to the bar's closing. This construction also would save a lot of computing time as there are no looped "if"'s.

Hope this helps.

Reply With Quote
(login for full post details)
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,232 since Jun 2009
Thanks Given: 33,103
Thanks Received: 101,341


ptcm View Post
if date <> date[1] then begin

myHigh
= H;
myLow = L;

end;

I've tried that. The problem is that whenever the AM session high > PM session high, MyHigh is giving me the AM session HIGH.
How could I get the PM session high/low ? I've looked up the TS code manual. There's no such thing as Session High/Low.

I am trying to isolate each session's volatility and measure the serial correlation in order to get a better idea as to whether the next session is gonna be high or low vol environment.


The HSI futures trading hours are the followings:

9:45-12:30
14:30-4:15



I don't understand how that could be the case. Are you running a 24 hour chart?

You could also just replace the first line of my code (date <> date[1]) with Doctor Leo's example of (time = 0945), in other words at 9:45am a new session begins (like my "new date" begins) and starts recording the H/L. But will only work on minute charts where the end of the bar equals 9:45am, you'll need to play with it for different size charts.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote





Last Updated on December 23, 2010


© 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