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

An example for SetStopLoss

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

    An example for SetStopLoss

    Hi support,

    I havea customstrategy, when the strategy is executed
    it will short "eruusd" the default value 50000
    I then make
    I make a "setstoploss"
    then when another criteria happen I cover 30000.
    ExitShort(
    30000);

    but the stop loss is stil on 50000!
    how can I change the stop loss to 30000 ?
    Thanks in advance
    Crunchy
    Last edited by crunchy; 05-08-2010, 07:37 PM.

    #2
    Hello,

    This link explains how to scale out of a position:


    Let me know if you have questions.
    DenNinjaTrader Customer Service

    Comment


      #3
      thanks,
      But I would like to have my stoploss on fixet position, not moving up with the prise

      Thanks
      Crunchy

      Comment


        #4
        Hello,

        Depending on what you mean exactly, just put your SetStopLoss() statement in the Initialization() block. That is discussed here:
        DenNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by geotrades1, Today, 10:02 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bmartz, Today, 09:30 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X