Simple M.A. Summing Code - Won't compile in MC - EasyLanguage Programming | futures io social day trading
futures io futures trading

Simple M.A. Summing Code - Won't compile in MC
Updated: Views / Replies:4,336 / 12
Created: by bobbakerr Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

Simple M.A. Summing Code - Won't compile in MC

  #11 (permalink)
Site Administrator
Manta, Ecuador
Trading Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 46,932 since Jun 2009
Thanks: 29,918 given, 86,966 received

bretter View Post
EDIT: It turns out that MC does not support the "Switch" statement in the code. I have used Switch instead of If..Then to speed up the code in TS, but it looks like MC does not have that capability! Ouch!

Actually, yes it does support switch/case statements.


Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
  #12 (permalink)
The Netherlands
Trading Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
Jura's Avatar
Posts: 774 since Apr 2010
Thanks: 2,347 given, 667 received

Big Mike View Post
Actually, yes it does support switch/case statements.


See for example here:
MultiCharts: Trading Software for Automated Trading and Backtesting • View topic - Function to print the Time Scale in use
MultiCharts: Trading Software for Automated Trading and Backtesting • View topic - Learning SWITCH / CASE

Reply With Quote
  #13 (permalink)
Elite Member
Austin, TX
Trading Experience: Advanced
Platform: Tradestation
Posts: 16 since Sep 2010
Thanks: 5 given, 12 received

Missing Switch Statement?

Perhaps I spoke too soon on supporting Switch statements. I will go back and try some more when I get a chance. In my particular case, I was using the following:
Switch Var1
   Case True: Code...
   Case False: Code...
In TS, it compiles and works fine. In MC, when I try to compile the indicator, I get the cryptic error:
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)

When I change the case statement to If..Then, it compiles and works fine.

Also in the MC help file, there is no Switch statement listed - see picture.

So, does MC not like Switch statements using boolean variables? And why do you think it is not listed in the help file (Case is not there either)?

Attached Thumbnails
Simple M.A. Summing Code - Won't compile in MC-switch.jpg  
Reply With Quote


futures io > > > > > Simple M.A. Summing Code - Won't compile in MC

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Journal Challenge $1600 in Prizes & Free Journalytix for all participants!


The Driving Force Behind the Market w/Earn2Trade

Mar 5

TBA w/Stage5 & iSystems

Mar 12

TBA w/John Grady @ No BS Day Trading

Mar 19

Day Trading Oil Futures: Reducing Risk & Increasing Profits w/DTN IQFeed

Mar 26

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need simple code for StochRSI please TraderTom NinjaTrader Programming 5 May 6th, 2014 06:36 PM
MC: Simple strategy code problem / Easy Language true EasyLanguage Programming 4 December 19th, 2010 09:48 AM
Simple 30M Bar Strategy Won't Go vegasfoster NinjaTrader Programming 3 October 23rd, 2010 08:31 PM
How to code a Simple Moving Average? Fat Tails NinjaTrader Programming 5 October 20th, 2010 09:04 PM
Missing something very simple on my code sharp2be NinjaTrader Programming 5 May 22nd, 2010 11:40 PM

automated trading, backtesting, code, easylanguage, indicator, indicators, information, multicharts, neoticker, scale in, support, switch, tradestation, trading, trading software, white, xaverage

All times are GMT -4. The time now is 05:12 PM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business,
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.
no new posts
Page generated 2019-02-23 in 0.20 seconds with 15 queries on phoenix