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!
See more
See less

Partner 728x90

Collapse

How to print the signal by a code function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to print the signal by a code function

    Hi NT8,

    I am looking for a way to print the signal of all entered trades by a code function.

    - I realize I could print ("string") when I enter a trade and remove it when I exit
    - however, my strategy is having trouble only entering the 'one-time' I want it to for a signal and may enter 2-6 times (as in, I code a signal to enter once based on an indicator, and it enters 5 times on that same signal, even though I am seeking for it to enter one once - and I need to know which signal is causing this)
    - looking for a way for the print to list something like the below (assuming my entry signals were numbered sequentially)

    Output window:

    Account position: 12L Entry Signal Names: "1" "2" "3" "4" "5" "5" "5" "5" "5" "5" "6" "7"


    - in the example above, If I simply printed a single "string" on the entry if signal "5" as suggested in bullet one, I would be at 12L, but I would not know which signal had multiple entries. it would like like this:
    Account position: 12L Entry Signal Names: "1" "2" "3" "4" "5" "6" "7"

    Thank you!

    #2
    Hi Austiner, thanks for posting. It depends on how your strategy is written. You can use a boolean variable to print something only once and then reset the boolean once the trade finishes.

    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SteveReiza, Today, 09:41 PM
    0 responses
    5 views
    0 likes
    Last Post SteveReiza  
    Started by astor, Today, 09:20 PM
    1 response
    11 views
    0 likes
    Last Post astor
    by astor
     
    Started by astor, Today, 09:19 PM
    0 responses
    5 views
    0 likes
    Last Post astor
    by astor
     
    Started by WaleeTheRobot, 01-07-2024, 10:07 AM
    17 responses
    509 views
    2 likes
    Last Post kashter
    by kashter
     
    Started by Kraken29, 02-26-2024, 10:40 AM
    2 responses
    19 views
    0 likes
    Last Post Kraken29  
    Working...
    X