NexusFi: Find Your Edge


Home Menu

 





Quick question - Daily Open


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,654 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?
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
Roland Garros Final Day: $3M on Zverev at 80.5% -- Leban …
Prediction Markets & Event Contracts
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
Warsh Rate Hike at 40%, Iran June 15 Expires Tonight at …
Prediction Markets & Event Contracts
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #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 Backtesting ? View topic - [FAQ] EasyLanguage / 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,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

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 X 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


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