NexusFi: Find Your Edge


Home Menu

 





Does Close REALLY mean Current Price or what?!


Discussion in EasyLanguage Programming

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




 
Search this Thread

Does Close REALLY mean Current Price or what?!

  #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?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
29 thanks
Tao te Trade: way of the WLD
24 thanks
Diary of a simple price action trader
21 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
10 thanks
  #3 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,662 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,350



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,662 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,350


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