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 Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
267 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
||
Started by Mestor, Today, 03:15 AM
|
0 responses
2 views
0 likes
|
Last Post
by Mestor
Today, 03:15 AM
|
||
Started by Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
409 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
Comment