Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to make an entry Signal Name follow a formula

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

    How to make an entry Signal Name follow a formula

    Hi NT8,

    EnterShortLimit(Convert.ToInt32(ContractsCurrency) , GetCurrentAsk(0), @"2");

    In the above code, my signal name is 2 - at the end. I am looking for a way to make this name from a formula, so I don't have to code a separate entry for, say, 2-10, I can just say += VariableForLastTradeSignal. Etc.

    This matters because I want my exit conditions to be variable based on the entry. Thank you!

    #2
    Hello Austiner87,

    The signal name is just a string so you can use any means you wanted to generate a string value that equals the name you wanted. If you were just using a number you could use an int variable there and call VariableForLastTradeSignal.ToString() on the variable to make it into a string. You would have to work out any logic that increments or otherwise keeps track of the number for the signal name.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X