Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I want to call OnBarUpdate() multiple times, like having a Shell/Loop above it. Let me explain what I try to achieve.
I want to set a StartTime = 10:00 and EndTime == 16:00. In that period, I take some statistics for each bar. Once this is done for the entire Time Frame, let’s say 5 days (5 sessions and I expect to get 5x “Bars.IsFirstBarOfSession”), I want to collect the same statistics for StartTime = 11:00 and EndTime = 16:00 for every bar again.
I can achieve this with Properties and set the StartTime and EndTime BUT I would need to run this manually and make changes to the Properties manually, let’s say 5 times for StartTime = 10:00, 11:00, 12:00, 13:00 etc.
But instead of having the time set manually, I want to have the time set Automatically to 10:00, run NT completely thru all Bars, then automatically set to 11:00, run again OnBarUpdate() thru all Bars.
Note: i might even want to change other variables/properties. So its basically similar to NT Strategy Analyzer - Optimizer, where multiple iterations run.
For( int i=0; i < 5; i++ )
{
switch( i)
{
Case 0:
StartTime = 10:00;
EndTime = 16:00;
Case 1:
StartTime = 11:00;
EndTime = 16:00
Case 3:
StartTime = 12:00;
EndTime = 16:00
Etc.
}
OnBarUpdate()
{
If( ToTime(Time[0]) > ToTime(StartTime) && ToTime(Time[0]) <= ToTime(EndTime) )
{
// collecting my statistics
}
// but also outside i want to collect information/statistics
}
}
How can I achieve this best; do i need to write a Windows script to achieve this?
Maybe this has been discussed already somewhere and someone can send me the link of it.
Any help is much appreciated !
Can you help answer these questions from other members on NexusFi?