Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitLongs & ExitShorts

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

    ExitLongs & ExitShorts

    Hello,

    I have a simple crossovser setup that I could use some help on...

    I'm trying to obtain the highest close in the trade to maximize profit. As I have it, to exit the trade the line on close crosses below the fast MA and takes the profit.
    How can I attain the highest point and take profit vs the close crossing below the MA line..?? I have the Pivots indicator on the chart and I was thinking of coming up with the correct logic using Exitlongs and Exitshorts and using the pivots indicator to exit the trade. I'm not quite sure how to get the logic correct using the Strategy Builder...

    Thanks
    Michael



    Click image for larger version

Name:	Exit Long.jpg
Views:	350
Size:	179.8 KB
ID:	1072463

    #2
    Hello Mykro,

    What are the rules you would like to use for detecting that high as the data is processed?

    Are you wanting a specific distance in ticks from the entry?

    Do you want to compare to the highest high of the day?

    Or possibly the highest high in a specific amount of bars?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      I guess it would be the highest high in a specific amount of bars..?

      If you look at the blue arrow I put on the image, from the arrow down to where the red line crossed over the blue line. that would be the entry point...

      Thanks Michael

      Comment


        #4
        Hello Michael,

        To confirm, you would like to trigger an exit after every new high after the entry bar?

        The entry bar number can be saved by assigning CurrentBar to a variable.

        On new bars, wsing CurrentBar minus this variable would give a value which can be used for the period of the HighestBar() method.



        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        132 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        118 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X