NexusFi: Find Your Edge


Home Menu

 





Quick question - Daily Open


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,001 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
damnpenguins's Avatar
 damnpenguins 
West Sussex, UK
 
Experience: Intermediate
Platform: MultiCharts
Trading: NQ & DAX
Posts: 15 since Nov 2011
Thanks Given: 39
Thanks Received: 4

Hi everyone,

First post so apologies if it is a really simple question.

I've just started programming in MC / Powerlanguage and I am seeing a difference between the daily open as plotted on my hourly chart, and the daily open on a 100 tick chart.

Both are using the OpenD(0) keyword. As an example, On my hourly GBPUSD chart I have todays Open @ LMAX @ 1.67345, but on the 100 tick chart is it @ 1.67283.

I understand that the tick chart has a different opening bar and therefore would display a different value for the daily open, however I am wanting to find out how to ensure I have the daily open from my hourly chart displayed on the tick charts.

Is there a way to ensure I have the same lines across all my charts? Hourly, 100 Tick, 233 Tick etc??

Am I using the openD reserved word incorrectly? Do I need to set the daily open in a global variable etc?

Here is the (simplified) code snippet I am using:
 
Code
If Date <> Date[1]  then
begin
   		{== print out each days' daily open     ==}
     		dailyOpenLevel =tl_new_s(d, time_s, OpenD(0) , d+1, time_s, OpenD(0));
end;
Any assistance would be greatly appreciated

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
TOS inspired trading simulator
ThinkOrSwim
Cycle Through Ninjatrader Open Windows
NinjaTrader
NinjaTrader indicator for last bar percentages
NinjaTrader
Anyone Trading Equities using NT8?
NinjaTrader
What a Cool Draw/Markup Tool!
Traders Hideout
 
  #3 (permalink)
 
damnpenguins's Avatar
 damnpenguins 
West Sussex, UK
 
Experience: Intermediate
Platform: MultiCharts
Trading: NQ & DAX
Posts: 15 since Nov 2011
Thanks Given: 39
Thanks Received: 4


Just to pre-empt the RTFM response, I've been looking into this and based on this post ( MultiCharts: Trading Software for Automated Trading and [AUTOLINK]Backtesting[/AUTOLINK] ? View topic - [FAQ] [AUTOLINK]EasyLanguage[/AUTOLINK] / PowerLanguage) on the MC website I've added the daily chart to the tick charts to reference the higher timeframe data.

The only problem is that I am getting yesterdays Open price rather than today's open price. This is probably because the charts are referenced differently in MC, at the closing of the period rather than the start, is that right? So based on that do I have to take the open price from the hourly chart @ the close of the first bar?

Here is the code, I am sure it is wrong, I've chopped and changed it so many times:

 
Code
var: dOpen(0, data2);
dOpen =  OpenD(0) Data2;

print(OpenD(0):0:5, " " , dOpen:0:5);
I'm seriously lost here so would appreciate some help.

Started this thread Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,441 since Apr 2013
Thanks Given: 491
Thanks Received: 1,634

Hi damnpenguins,

if you have already added the daily chart to your tick chart as data 2, I would suggest simply changing your code so that you use the Open directly:

 
Code
var: dOpen(0, data2);
dOpen =  Open Data2;

print(OpenD(0):0:5, " " , dOpen:0:5);
Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
 
damnpenguins's Avatar
 damnpenguins 
West Sussex, UK
 
Experience: Intermediate
Platform: MultiCharts
Trading: NQ & DAX
Posts: 15 since Nov 2011
Thanks Given: 39
Thanks Received: 4

Cheers!

Started this thread Reply With Quote




Last Updated on March 5, 2014


© 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