NexusFi: Find Your Edge


Home Menu

 





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


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Big Mike with 3 posts (3 thanks)
    2. looks_two bobbakerr with 3 posts (0 thanks)
    3. looks_3 vegasfoster with 2 posts (1 thanks)
    4. looks_4 bretter with 2 posts (0 thanks)
    1. trending_up 6,960 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 12 posts
    2. attach_file 1 attachments




 
Search this Thread

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

  #11 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,482 since Jun 2009
Thanks Given: 33,252
Thanks Received: 101,682


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.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
OrderFlow-Based Support/Resistance Levels
Emini and Emicro Index
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
What broker to use for trading palladium futures
Commodities
Strategy stop orders partially filled
EasyLanguage Programming
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
32 thanks
Just another trading journal: PA, Wyckoff & Trends
23 thanks
Trading with Intuition
17 thanks
Self sabotage reframed
11 thanks
ApexTraderFunding.com experience and review
10 thanks
  #12 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690


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

True.

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

Reply With Quote
  #13 (permalink)
 bretter 
Austin, TX
 
Experience: Advanced
Platform: Tradestation
Posts: 16 since Sep 2010
Thanks Given: 5
Thanks Received: 12


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:
 
Code
Switch Var1
Begin
   Case True: Code...
   Case False: Code...
End;
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
Click image for larger version

Name:	Switch.JPG
Views:	144
Size:	62.9 KB
ID:	44231  
Reply With Quote




Last Updated on July 22, 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