See attached.
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
Display Bug in DrawText Method
Collapse
X
-
Originally posted by NinjaTrader_Bertrand View PostKBJ, I tried this on my end but not sure I follow what you would expect to see - the DrawText is placed on the next bar after your barcount condition is fullfilled.
Inseead, the text is being displayed 1/2 to 1.5 bars to the left of the bar in question (see my screen snapshot again).
Since the DrawText method is being called from immediately after the EnterLong call, shouldn't the text be displayed on the same bar as the trade visualization?
(That's all I'm trying to do, by the way, is to just add some additional text to the trade visualization, for which there is no provision in the overloads for SetStopLoss and SetProfitTarget. Add to feature suggestions?)
I'd expect the text display to be a bar to the left if I'd specified the "barsAgo" parameter with a value of 1, but I didn't do that.
Is there some other nuance that I'm missing here?
Comment
-
Bertrand, Thanks for the explanation.
It was already calling the DrawText method on the BarsInProgress==1 OnBarUpdate.
I changed the design so it now does the display on the next BarsInProgress==1 OnBarUpdate. This now works but is lots of extra coding.
What contortions it takes to make it do what I want.
If anyone's interested, the working version of the code is attached. (It is, at least a good ... and fairly well commented ... example of how to switch control back and forth between the OnBarUpdate calls with the different BarsInProgress values.)
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment