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 Saroj with 1 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,171 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 1 attachments




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

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?
My Rant with AMP Futures
Trading Reviews and Vendors
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
What we know about Binances $6.3bn hack - BBC News
Cryptocurrency
AI for Traders — Agents, Memory, Tools & Real-Worl …
Elite Quantitative GenAI/LLM
 
  #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


© 2026 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 - Downloads - Top
no new posts