Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What would be the best way to code a trade management?

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

    What would be the best way to code a trade management?

    Hi

    I would like to manage my trade but am not sure how best to code it in NT7. Could I please have some pointers?

    Basically upon entering a long position, I would like to place a stop level (which is mathematically calculated.

    As prices move in my favour, I would like to bring the stop level to breakeven.

    As prices move further in my favour, I would like to place a stop where as new highs are printed, the distance between the new highs and the stop stays the same or perhaps tighten the stop.

    What would be the best way to go about this?

    Regards

    Kay Wai

    #2
    Hi Kay, for the basic working of creating a custom trailing stop please see this reference sample :



    Conceptually I feel you have mainly 2 choices :

    a) use SetStopLoss() to change the stop level when ever needed by your tracking conditions, breakeven, move into profit etc

    b) calculate your custom stop price in a variable and then use this variable in your stop loss method call.

    Some examples for custom trailing stop algorithms are also found in the sharing which could provide a starting point for your own work:



    Lastly, it's useful to use draw objects to visualize the current calculated stop loss level as debug aid.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    566 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X