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

Profit taken

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

    Profit taken

    Hi
    this might seem impossible. I want to set so if I have like 10 point gain or more, my least point gain is 10 point.

    I know you might say set trail stop but I don't want it to work like that. I want it to keep trading until I hit my selling point by using some indicator. But say if it gain 50 points but it won't sell, I want to make sure I would at least capture 10 point gain.

    Basically when I play 5m timeframe, by the time my bot sell, it wait till next candle and it can be late.

    Thank you

    #2
    Hello, thanks for posting.

    The best way to do that would be a SetTrailStop which will stay x ticks behind the market price. If you wanted some other behavior you would need to implement custom order movement logic with ExitLongLimt/ExitShortLimit. You can use the ChangeOrder method to change the order to the desired price level:



    Best regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Ahh I was wonder what are those are for. Lol thank you.

      One question if you can help me. I set a trading time from 930am to 330pm and it work great. But when I set 7pm to 8am, I won't trade, im I doing something wrong?

      Comment


        #4
        Hi, thanks for your reply.

        If you add a Print method within your condition you can check if the condition is being reached e.g.

        if(<time fileter condition>)
        {

        Print("Making Trade");
        EnterLong();

        }

        Using Print methods should be a common part of the debugging process of all scripts:


        Best regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        0 responses
        3 views
        0 likes
        Last Post helpwanted  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X