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,103 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

  #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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
22 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #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
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,207
Thanks Received: 101,599


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
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving 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
  #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
  #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
  #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
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,207
Thanks Received: 101,599


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
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving 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