NexusFi: Find Your Edge


Home Menu

 





indicator update and template not saving


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one 35trader with 12 posts (1 thanks)
    2. looks_two Fat Tails with 10 posts (2 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 7,033 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 23 posts
    2. attach_file 0 attachments




 
Search this Thread

indicator update and template not saving

  #11 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


35trader View Post
Can you do the following.
Where within the EMA script does it trigger the at session end update and explain it?

thanks

OnBarUpdate() is triggered at session end, when COBC = false.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Deepmoney LLM
Elite Quantitative GenAI/LLM
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
 
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
38 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #12 (permalink)
35trader
Toronto, Canada
 
Posts: 26 since Oct 2011
Thanks Given: 0
Thanks Received: 3


Fat Tails View Post
OnBarUpdate() is triggered at session end, when COBC = false.

Greatly appreciated, that I did not know.


1 So if I create a second session within the same day, it updates the second session also (if set at false) even if no bars are developed because the market is closed?

Example:

Session 1 Monday - 9:30 am to 4:00 pm (market open) set at false updates at 4:00
Session 2 Monday - 4:30 pm to 6:00 pm (market closed) set at false updates at 6:00

2. When set at false it still updates on each new bar also? just confirming this.

thanks

Reply With Quote
  #13 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



35trader View Post
Greatly appreciated, that I did not know.


1 So if I create a second session within the same day, it updates the second session also (if set at false) even if no bars are developed because the market is closed?

Example:

Session 1 Monday - 9:30 am to 4:00 pm (market open) set at false updates at 4:00
Session 2 Monday - 4:30 pm to 6:00 pm (market closed) set at false updates at 6:00

2. When set at false it still updates on each new bar also? just confirming this.

thanks


With COBC = false, OnBarUpdate() will update with each incoming tick, no more and no less. So what you will see at session end is the state of the indicator as per last tick of that session. If there are no incoming ticks, OnBarUpdate() will not be triggered.

Historical bars are 1-tick bars, so OnBarUpdate() will be triggered once only for each bar on your chart.

Reply With Quote
  #14 (permalink)
35trader
Toronto, Canada
 
Posts: 26 since Oct 2011
Thanks Given: 0
Thanks Received: 3


Fat Tails View Post
With COBC = false, OnBarUpdate() will update with each incoming tick, no more and no less. So what you will see at session end is the state of the indicator as per last tick of that session. If there are no incoming ticks, OnBarUpdate() will not be triggered.

Historical bars are 1-tick bars, so OnBarUpdate() will be triggered once only for each bar on your chart.

I have a feeling were stepping backwards or missed communication happen.

Its the indicator update that is my focus, using the OnBarUpdate() the indicator is updated on the first tick of the new bar, but at session end say at 4:00 pm the next bar is possibly at 9:30 am the next morning and I don't wait for the first tick at 9:30 am that creates a new bar and a indicator update. I want it triggered at session end "also" and thought setting it at false did this? so indicator updates would occur at new bar and session end both.

I likely will see if the false works on live today as I have a symbol that is currently trading in a trigger spot on my indicator, so I hope to berify this today.

But what happens if one uses EOD data (not live) and the data comes in after the session end, this is where I wanted to have the indicator update immediately vs waiting for the EOD on the next day (needs next cansle) to trigger the indicator. Maybe I need a false ending session that occurs after the EOD delayed data comes in so it updates immediately.

Hope this makes sense.

appreciate your help.

Reply With Quote
  #15 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


35trader View Post
I have a feeling were stepping backwards or missed communication happen.

Its the indicator update that is my focus, using the OnBarUpdate() the indicator is updated on the first tick of the new bar, but at session end say at 4:00 pm the next bar is possibly at 9:30 am the next morning and I don't wait for the first tick at 9:30 am that creates a new bar and a indicator update. I want it triggered at session end "also" and thought setting it at false did this? so indicator updates would occur at new bar and session end both.

I likely will see if the false works on live today as I have a symbol that is currently trading in a trigger spot on my indicator, so I hope to berify this today.

But what happens if one uses EOD data (not live) and the data comes in after the session end, this is where I wanted to have the indicator update immediately vs waiting for the EOD on the next day (needs next cansle) to trigger the indicator. Maybe I need a false ending session that occurs after the EOD delayed data comes in so it updates immediately.

Hope this makes sense.

appreciate your help.

If you want an update at session end you need to set you indicators to COBC = false. I am repeating this now. Otherwise the indicator value of the last bar of the session will not be calculated until the first tick of the new session arrives.

For EOD data you need to make the difference between live real-time data and historical data. After the session end you have to wait for a few minutes until the data provider is ready to supply you with daily historical data (this is not an incoming real-time tick). Once daily data is available, you can either

-> download it for all instruments via the Historical data manager (this is what I do, I select the default list and download everything at once)
-> connect to NinjaTrader and open a new chart for the instrument

Once you have downloaded historical data, to show the indicator value for the last day, guess what, you have to set your indicators to COBC = false.

It is not that difficult to understand.

Reply With Quote
  #16 (permalink)
35trader
Toronto, Canada
 
Posts: 26 since Oct 2011
Thanks Given: 0
Thanks Received: 3


Fat Tails View Post
If you want an update at session end you need to set you indicators to COBC = false. I am repeating this now. Otherwise the indicator value of the last bar of the session will not be calculated until the first tick of the new session arrives.

For EOD data you need to make the difference between live real-time data and historical data. After the session end you have to wait for a few minutes until the data provider is ready to supply you with daily historical data (this is not an incoming real-time tick). Once daily data is available, you can either

-> download it for all instruments via the Historical data manager (this is what I do, I select the default list and download everything at once)
-> connect to NinjaTrader and open a new chart for the instrument

Once you have downloaded historical data, to show the indicator value for the last day, guess what, you have to set your indicators to COBC = false.

It is not that difficult to understand.

LOL

I made a test end session time that happens after the EOD data arrives and will see if the false solves my issue.

greatly appreciate your help

Reply With Quote
Thanked by:
  #17 (permalink)
35trader
Toronto, Canada
 
Posts: 26 since Oct 2011
Thanks Given: 0
Thanks Received: 3


Fat Tails View Post
If you want an update at session end you need to set you indicators to COBC = false. I am repeating this now. Otherwise the indicator value of the last bar of the session will not be calculated until the first tick of the new session arrives.

For EOD data you need to make the difference between live real-time data and historical data. After the session end you have to wait for a few minutes until the data provider is ready to supply you with daily historical data (this is not an incoming real-time tick). Once daily data is available, you can either

-> download it for all instruments via the Historical data manager (this is what I do, I select the default list and download everything at once)
-> connect to NinjaTrader and open a new chart for the instrument

Once you have downloaded historical data, to show the indicator value for the last day, guess what, you have to set your indicators to COBC = false.

It is not that difficult to understand.

Did the following:

1. Altered the session time to occur after the EOD data was available.
2. Updated the EOD data and set the false setting and saved template.
3. Opened Ninja from scratch after the session ended to see if the indicator updated, it did not trigger as it should have.

So I must have an issue within the indicator that is not allowing the "false" function to work?

Reply With Quote
  #18 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


35trader View Post
Did the following:

1. Altered the session time to occur after the EOD data was available.
2. Updated the EOD data and set the false setting and saved template.
3. Opened Ninja from scratch after the session ended to see if the indicator updated, it did not trigger as it should have.

So I must have an issue within the indicator that is not allowing the "false" function to work?

Why don't you post a screenshot and the code of the indicator, otherwise we will exchange messages for ever.

Reply With Quote
Thanked by:
  #19 (permalink)
35trader
Toronto, Canada
 
Posts: 26 since Oct 2011
Thanks Given: 0
Thanks Received: 3


Fat Tails View Post
Why don't you post a screenshot and the code of the indicator, otherwise we will exchange messages for ever.

Its not that I don't want to show you, I first had to determine what I should show you, as stated I'm not programmer.

I have had feed back from the actual programmer today:

"An event is classified as when a tick comes in and the current candle is updated, or when the user scrolls the chart window. So the program starts by initializing the indicator and scans through each historical candle in Ninja's database and calculates the indicator. This loop starts at line 3670. When it reaches the end (the right hand side / the current candle) it stops. During this loop it checks for directional triggers."

The issue is as stated when the indicator gets all the way over to the current EOD data, it does not use the data on that day to update if a trigger occurred that day, it needs the follow on EOD to trip the trigger.
My live daily chart also has the same issue, checking if it updates on the first tick at 6:00pm for NG, it should because the trigger is defined under live updates differently, for lack of better words.

Ok I have found out that he did use OnBarUpDate () when plotting historic EOD??
he even says that function has no value on the live candle, but I know off live candles it updates on the first tick of the new bar, which operates fine.

Maybe the following data helps you out?
Should I some how insert the OnBarUpdate() in the script for the historic EOD update, like I know how to do it LOL.

thanks

Reply With Quote
  #20 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



35trader View Post
Its not that I don't want to show you, I first had to determine what I should show you, as stated I'm not programmer.

I have had feed back from the actual programmer today:

"An event is classified as when a tick comes in and the current candle is updated, or when the user scrolls the chart window. So the program starts by initializing the indicator and scans through each historical candle in Ninja's database and calculates the indicator. This loop starts at line 3670. When it reaches the end (the right hand side / the current candle) it stops. During this loop it checks for directional triggers."

The issue is as stated when the indicator gets all the way over to the current EOD data, it does not use the data on that day to update if a trigger occurred that day, it needs the follow on EOD to trip the trigger.
My live daily chart also has the same issue, checking if it updates on the first tick at 6:00pm for NG, it should because the trigger is defined under live updates differently, for lack of better words.

Ok I have found out that he did use OnBarUpDate () when plotting historic EOD??
he even says that function has no value on the live candle, but I know off live candles it updates on the first tick of the new bar, which operates fine.

Maybe the following data helps you out?
Should I some how insert the OnBarUpdate() in the script for the historic EOD update, like I know how to do it LOL.

thanks


Whatever is the problem, it is caused by the code.....

Reply With Quote




Last Updated on August 31, 2012


© 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