Announcement

Collapse
No announcement yet.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    79 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X