Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:	284
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 MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        6 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        6 views
        0 likes
        Last Post mattbsea  
        Working...
        X