NexusFi: Find Your Edge


Home Menu

 





gets Bar Time from differents charts


Discussion in Sierra Chart

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




 
Search this Thread

gets Bar Time from differents charts

  #1 (permalink)
 crazybears 
Alesia E.U.
 
Experience: Intermediate
Platform: Sierra chart
Trading: Futures
Posts: 168 since Feb 2011
Thanks Given: 146
Thanks Received: 115

someone can give me some hint how can i retrieve the start time of bars from others charts
and compare them with the bars time of the chart where i apply the study ?
e.g on a renko or range chart each bar has different open time,
i would compare it with the time taken from other instruments
e.g compare the time of opening bar of ES TF NQ YM

thanks
Max

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
ZombieSqueeze
Platforms and Indicators
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #3 (permalink)
 yonatan 
Haifa Israel
 
Experience: Beginner
Platform: sierra chart
Broker: Optimus Trading Group/Rithmic
Trading: es
Posts: 91 since Apr 2012
Thanks Given: 50
Thanks Received: 71


There probably is an easier solution but here is what I have on mind:

Lets call the charts from which you want to get the bars start time Source Charts and lets call the chart that will get those values the Destination Chart.

On the Source charts you will have to add a study that will store the time values in persistent variables, for an example you can use something like this:

int& Hour= sc.PersistVars->i1;
int& Minute= sc.PersistVars->i2;
int& Second= sc.PersistVars->i3;

SCDateTime DTV = sc.BaseDateTimeIn[sc.Index];
DTV.GetTimeHMS(Hour, Minute, Second);



Then, on the Destination chart you will have another study that will get those time values using:

const s_sc::s_PersistentVariables * p_PersistVars = sc.GetStudyPersistentVariablesFromChartUsingID( Source.GetChartNumber(), Source.GetStudyID());

Something like this:

CSFExport scsf_DestinationStudy(SCStudyGraphRef sc)
{
SCInputRef Source = sc.Input[0];

if (sc.SetDefaults)
{
Source.Name = "Source_Chart_&_Study_Numbers";// Use those inputs to choose the source study on the source chart.
Source.SetChartStudyValues(1,0);

return;
}


const s_sc::s_PersistentVariables * p_PersistVars = sc.GetStudyPersistentVariablesFromChartUsingID( Source.GetChartNumber(), Source.GetStudyID());

int Hour = p_PersistVars->i1;
int Minute = p_PersistVars->i2;
int Second = p_PersistVars->i3;


}


The sc.GetStudyPersistentVariablesFromChartUsingID function creates a link between the corresponding persistent variables on the source study and the destination study so that each time the values of Hour, Minute and Second change on the source chart they will immediately be updated on the destination chart with the values from the source.

This is documented here :
ACSIL Interface Members - Functions - Sierra Chart


I hope this helps.

Reply With Quote
Thanked by:
  #4 (permalink)
 crazybears 
Alesia E.U.
 
Experience: Intermediate
Platform: Sierra chart
Trading: Futures
Posts: 168 since Feb 2011
Thanks Given: 146
Thanks Received: 115

Hi Yonatan

thanks for help

Started this thread Reply With Quote




Last Updated on May 26, 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 - Downloads - Top
no new posts