Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I need my code critiqued (Please help me LEARN!)

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

    I need my code critiqued (Please help me LEARN!)

    Hi,
    I'm new to the forum. I'm an entry level C# developer and novice trader. I've been using NT for almost a week now. I'd like you guys to please take a look at this code I've written and point out all of the unnecessary variables, method calls, etc...that I have in here but please don't provide any source code for me. I'm trying to learn how to write good code so I don't want anyone to provide me with the solution I need to figure out how to write it myself.

    This strategy goes long if the underlying hits a n-period high and has a range expansion greater than x-periods ago. It goes short under the same circumstances but the only difference is a n-period low.

    So, would you please point out the correct way this should be wrote? I also haven't figured out which NT method to use to establish long/short positions accompanied with trailing stops...will some please point in the right direction?


    Help me LEARN!
    Attached Files

    #2
    d.allen101,

    To attach a trailing stop please use SetTrailStop().
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    124 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Yesterday, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Yesterday, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Yesterday, 03:01 PM
    2 responses
    22 views
    0 likes
    Last Post helpwanted  
    Working...
    X