Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using "Signal Name" as Input?

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

    Using "Signal Name" as Input?

    Hi,
    I'd like to be able to create a rule that prevents the next trade if the last historical trade was a "Stop Loss".
    Rough logic being something like:

    Last "Exit Name" does not equal "Stop Loss"
    or
    Last:SignalName:ExitName:StopLoss = False.

    Is there a simple way to access this? Is there a different way to accomplish this goal?

    Thanks for any ideas - Marcus

    #2
    Hello mazcis,

    Thank you for your note.

    For something like this, you'd need to manually code the strategy, just in case you're using the Builder currently.

    I think the best route here would be create a bool set to true, and to monitor in OnExecutionUpdate for when you have an order come in that has a status of filled or partially filled that also has the same signal name you've set for your stop loss, and if it it does match, set the bool to false, and if any other kind of order comes in, set it to true.

    You could then check the bool in On Bar Update in your conditions for entry, and not allow entry if the bool is false. You'd probably want more logic to reset it to true if conditions look right to reallow trading, or it would just cease trading at the point that the bool becomes false.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X