Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simulated Trail Stop Sample Code

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

    Simulated Trail Stop Sample Code

    Would someone please post a sample of code that will Compile. Thanks.

    Code:
    SetTrailStop(string fromEntrySignal, CalculationMode mode, double value, bool simulated)

    #2
    Hello mainstream,

    An example of SetTrailStop with all overloads:

    Code:
    SetTrailStop("entryOrderName", CalculationMode.Ticks, 10, false);
    http://www.ninjatrader.com/support/h...ttrailstop.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea.

      I reviewed the results using the simulated data feed and the strategy, could you provide some clarification on the following variable and how they will change the behavior of the Simulated Trail Stop -- with examples?

      HTML Code:
      10, false);
      My thought was that at 10 tick profit the Simulated Trail Stop will follow 2 ticks behind market price, I suppose i was wrong in that assumption.

      When you say Overloads, are you inferring Overfills? That was a question, too, I have not reached that benchmark in development to begin researching Overfills.
      Last edited by mainstream; 10-25-2014, 09:33 AM.

      Comment


        #4
        Hello mainstream,

        Thank you for your response.

        The 10 would mean the stop trails behind the market by 10 ticks. The simulated bool allows for a simulated stop loss, if true, will simulate the stop order and submit as market once triggered.

        Overloads are passed to methods, in this case the SetTrailStop() method. The overloads being currency, mode, simulated, value, and fromEntrySignal.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rtwave, 04-12-2024, 09:30 AM
        2 responses
        20 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by tsantospinto, 04-12-2024, 07:04 PM
        5 responses
        68 views
        0 likes
        Last Post tsantospinto  
        Started by cre8able, Today, 03:20 PM
        0 responses
        7 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        49 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        115 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X