Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to Print something just once in OnbarUpdate
Collapse
X
-
Hello Boonfly8,
You would need to control this in the logic of the script. I would recommend using a bool (that can be flipped back to true on a new bar on bar close or on the first tick of a new bar)
Below is a public link to an educational site that demonstrates using a bool.
-
How to Print something just once in OnbarUpdate
I have something where if the trade makes $100, it will return to the onBarUpdate method and essentially quit. In the same if statement I also print the time and some text like "Pnl Target Hit".
How do I only print that once? when the pnl hits I don't want it to keep printing via every onBarUpdate. Is there a system.exit function in NT8?Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,602 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
8 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
4 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
12 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Leave a comment: