Additionally, how do I get open position unrealize pnl from multiple instrument using the indicator?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Keeping value when refresh
Collapse
X
-
Hello AldricJC,
Thank you for your post.
What value is changing? Is this the plot?
You can use Position.GetProfitLoss() for the strategy's position: http://www.ninjatrader.com/support/h...profitloss.htm
-
Originally posted by AldricJC View PostHow do I keep the value from changing when user hits refresh or adds another indicator?
Additionally, how do I get open position unrealize pnl from multiple instrument using the indicator?
(1) historical data (backfill) is different from real-time data
This is for example the case if you feed volume indicators with volume data from Interactive Brokers. The real-time volume they supply is just estimated volume (and in fact completely false). When you refresh this volume data is replaced with (mostly correct) historical data. Any volume based indicator, such as a VWMA or a VWAP will change its value.
(2) badly coded indicators
Some indicators perform calculations in a different way when used with real-time data compared to the way they work with historical data. In fact many indicators that you can download for free a flawed in some way or another. Before you use any unknown indicators with you charts, you need to perform a test, whether they work correctly.
Comment
-
I noticed this about VWAP even though I have CQG data. Why is the real-time volume data "false?" BEFORE and AFTER I F5, the volume as reported in the data-box remains unchanged even though the VWAP plot (on a minute chart) changes. It doesn't seem that the volume is false, it seems that the indicator is "false."
Comment
-
Originally posted by ScorpioTravis View PostI noticed this about VWAP even though I have CQG data. Why is the real-time volume data "false?" BEFORE and AFTER I F5, the volume as reported in the data-box remains unchanged even though the VWAP plot (on a minute chart) changes. It doesn't seem that the volume is false, it seems that the indicator is "false."
Did you try this one?
Comment
-
Originally posted by Harry View Post
Apparently it doesn't have the refresh issue?Last edited by ScorpioTravis; 12-12-2014, 04:17 PM.
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
5 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
61 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
4 responses
3,289 views
1 like
|
Last Post
by jgualdronc
Today, 10:02 AM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
24 views
0 likes
|
Last Post Today, 09:41 AM |
Comment