NexusFi: Find Your Edge


Home Menu

 





Coding style - great model


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Antisyzygy with 3 posts (0 thanks)
    2. looks_two droid17 with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Saroj with 1 posts (2 thanks)
    1. trending_up 2,317 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

Coding style - great model

  #1 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 485 since Jun 2009
Thanks Given: 232
Thanks Received: 415

I've attached an indicator written by Gordon Brest that epitomizes the best coding style (IMHO): very well organized; easy to see where specific code purpose lies... a great model to avoid "spaghetti code"... enjoy!

Attached Files
Elite Membership required to download: AaMA.cs
Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Futures True Range Report
The Elite Circle
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
Antisyzygy
Denver, Colorado, USA
 
Posts: 36 since Aug 2011
Thanks Given: 6
Thanks Received: 17


I like the use of indents, but I typically like more spaces between For loops, if statements, etc.

Reply With Quote
  #4 (permalink)
droid17
Baltimore
 
Posts: 5 since Sep 2011
Thanks Given: 1
Thanks Received: 1

Hi all,

I am a Java programmer. I am new to autotrades. What language is this in? Do only certain platforms run custom code?

Thanks,

Andrew

Reply With Quote
  #5 (permalink)
Antisyzygy
Denver, Colorado, USA
 
Posts: 36 since Aug 2011
Thanks Given: 6
Thanks Received: 17


droid17 View Post
Hi all,

I am a Java programmer. I am new to autotrades. What language is this in? Do only certain platforms run custom code?

Thanks,

Andrew

NinjaTrader is in C#. Its very similar, sort of like if C++ and Java had a baby. There is still garbage collection, etc.

Reply With Quote
  #6 (permalink)
droid17
Baltimore
 
Posts: 5 since Sep 2011
Thanks Given: 1
Thanks Received: 1

Ah gotcha! Do certain platforms run custom auto trading code? Looks like the attached was for Ninja Trader?

Thanks,

Andrew

Reply With Quote
  #7 (permalink)
Antisyzygy
Denver, Colorado, USA
 
Posts: 36 since Aug 2011
Thanks Given: 6
Thanks Received: 17


droid17 View Post
Ah gotcha! Do certain platforms run custom auto trading code? Looks like the attached was for Ninja Trader?

Thanks,

Andrew

I know NinjaTrader uses C#, but I am not sure about other platforms. I used to code Metatrader 4 and it was basically C (not C++). Tradestation, I believe, uses a scripting language called "EasyLanguage". Metatrader 5 I think uses C++, or some object oriented language which is very similar. Multicharts uses "Easy Language", which I am totally unfamiliar whether or not its a derivative of the Tradestation language. You can probably just do a quick Google search and check out some examples of other platforms. I apologize I am not more help, I have used primarily NinjaTrader and Metatrader 4.

Reply With Quote




Last Updated on September 7, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts