NexusFi: Find Your Edge


Home Menu

 





Does Close REALLY mean Current Price or what?!


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one djvie11 with 2 posts (0 thanks)
    2. looks_two kevinkdog with 2 posts (0 thanks)
    3. looks_3 Jura with 1 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 7,078 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
djvie11
Chicago, IL
 
Posts: 52 since Jul 2013
Thanks Given: 29
Thanks Received: 1

So this question has been racking my mind since I started coding in Easylanguage.

It clearly states here on Tradestation's "about reserved words page" that "Close" = "The last available price for the bar."

BUT

If you read further down just below the Price Data box it clearly states "For example, the reserved data word Close refers to the closing price of the bar currently being evaluated by the EasyLanguage procedure. " WHAT GIVES?

How I'm calculating my strategy greatly depends on the current price of the current bar, not the closing price. The closing prices gives me a lagged entrance / exit on my position.

I would love to hear some thoughts on this. Anything at all would be greatly appreciated!

Thanks,
Brandon

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Seeking Insights on Day Trading Options on Futures
Options
TOS inspired trading simulator
ThinkOrSwim
Cycle Through Ninjatrader Open Windows
NinjaTrader
How to: Multi Time-Frame Volume Profile?
NinjaTrader
Has anyone taken The Mentor Program from The Trading Gam …
Trading Reviews and Vendors
 
  #3 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,688 since Jul 2012
Thanks Given: 1,903
Thanks Received: 7,401



djvie11 View Post
So this question has been racking my mind since I started coding in Easylanguage.

It clearly states here on Tradestation's "about reserved words page" that "Close" = "The last available price for the bar."

BUT

If you read further down just below the Price Data box it clearly states "For example, the reserved data word Close refers to the closing price of the bar currently being evaluated by the EasyLanguage procedure. " WHAT GIVES?

How I'm calculating my strategy greatly depends on the current price of the current bar, not the closing price. The closing prices gives me a lagged entrance / exit on my position.

I would love to hear some thoughts on this. Anything at all would be greatly appreciated!

Thanks,
Brandon

You probably want to look at Intrabar Order Generation, but just a warning: that is a tricky topic to get into (I never use it). It will also make accurate backtesting impossible.

You could possibly change your bar size, maybe that will solve your problem.

Follow me on Twitter Reply With Quote
  #4 (permalink)
djvie11
Chicago, IL
 
Posts: 52 since Jul 2013
Thanks Given: 29
Thanks Received: 1


kevinkdog View Post
You probably want to look at Intrabar Order Generation, but just a warning: that is a tricky topic to get into (I never use it). It will also make accurate backtesting impossible.

You could possibly change your bar size, maybe that will solve your problem.

Thanks, Kevin. Yea I just started playing around with Intrabar Order Generation last month. Testing so far for me has to be "live" instead of backtesting.

Reply With Quote
  #5 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,688 since Jul 2012
Thanks Given: 1,903
Thanks Received: 7,401


djvie11 View Post
Thanks, Kevin. Yea I just started playing around with Intrabar Order Generation last month. Testing so far for me has to be "live" instead of backtesting.

Sounds good, although I would not recommend either approach (1. using intrabar, 2. doing "live" test instead of backtest).

Good Luck, I hope you find success!

Kevin

Follow me on Twitter Reply With Quote
  #6 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690


djvie11 View Post
(...) "Close" = "The last available price for the bar."

(...) Close refers to the closing price of the bar currently being evaluated by the EasyLanguage procedure. "

`Close` returns the last price of a bar, and what this price is depends on when the script is evaluated:

* When the script is evaluated on bar close (like indicators are on historical data), then `Close` returns the closing price of the bar.

* When the script is calculated on every tick (like real-time indicators and strategies, or a strategy backtested with intra-bar order generation), then `Close` refers to the current price of the bar. That can be the opening tick, closing tick, or any price in between.

This latter makes sense: since we don't know which real-time tick is the last tick of a price bar (there may or may not be more trades coming), `Close` returns the current price of the bar because, if no new ticks come in, then the current price of the bar is indeed the closing price. Hopefully that makes sense.

Reply With Quote
Thanked by:




Last Updated on August 9, 2015


© 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 - Sitemap - Downloads - Top
no new posts