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:	336
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 NullPointStrategies, Today, 05:17 AM
        0 responses
        46 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        66 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X