NexusFi: Find Your Edge


Home Menu

 





Translate simple code to Multicharts.NET!


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one Gabriel123 with 2 posts (0 thanks)
    2. looks_two sptrader with 1 posts (0 thanks)
    3. looks_3 ABCTG with 1 posts (1 thanks)
    4. looks_4 Jura with 1 posts (1 thanks)
    1. trending_up 1,700 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Translate simple code to Multicharts.NET!

  #1 (permalink)
 Gabriel123 
Stockholm
 
Experience: Intermediate
Platform: ProRealTime
Trading: DAX
Posts: 40 since Jul 2015
Thanks Given: 6
Thanks Received: 5

How would I translate this simple code to Multicharts.NET to create a "complete signal"?

Thanks in advance.

 
Code
                            
If RSI(c,2) < AND Average(C,200)

then buy next bar at open;

If 
RSI(c,2) > 65
then sell next bar at open


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Negative Balance Protection
Brokers
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
REcommedations for programming help
Sierra Chart
Is there a way to simulate CONTINUOUS CONTRACT?
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
34 thanks
Spoo-nalysis ES e-mini futures S&P 500
16 thanks
GFIs1 1 DAX trade per day journal
15 thanks
The Trading Pit "Futures VIP" Account Journal
15 thanks
Trading with Intuition
14 thanks
  #2 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690


Gabriel123 View Post
How would I translate this simple code to Multicharts.NET to create a "complete signal"?

Can you also post your MultiCharts .NET attempt so far? Then we can help with more focused comments and suggestions. That would be more helpful in the end for you.

Reply With Quote
Thanked by:
  #3 (permalink)
 
sptrader's Avatar
 sptrader 
Colorado
 
Experience: Advanced
Platform: MultiCharts
Broker: IB & Iqfeed
Trading: ES , CL
Posts: 535 since Apr 2010
Thanks Given: 1,097
Thanks Received: 702


The Multicharts discussion forum is probably the best place to ask that..if you don't get your answer here.... I use the standard version of Multicharts, so I can't be of much help..

http://www.multicharts.com/discussion/viewforum.php?f=19

Reply With Quote
  #4 (permalink)
 Gabriel123 
Stockholm
 
Experience: Intermediate
Platform: ProRealTime
Trading: DAX
Posts: 40 since Jul 2015
Thanks Given: 6
Thanks Received: 5


Jura View Post
Can you also post your MultiCharts .NET attempt so far? Then we can help with more focused comments and suggestions. That would be more helpful in the end for you.

This is what I have so far:

 
Code
                            
using System;

using System.Drawing;
using System.Linq;
using PowerLanguage.Function;
using ATCenterProxy.interop;

namespace 
PowerLanguage.Strategy {
    public class 
___Test01 SignalObject {
        public 
___Test01(object _ctx):base(_ctx){}
        private 
IOrderMarket buy_order;
        protected 
override void Create() {
            
// create variable objects, function objects, order objects etc.
            
buy_order OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, EOrderAction.Buy));
        }
        protected 
override void StartCalc() {
            
// assign inputs 
        
}
        protected 
override void CalcBar(){
            if 
RSI(c,2) < && Average(C,200) {
                
buy next bar at open;
            }
            
            if 
RSI(c,2) > 65 {
                
sell next bar at open;
            }
        }
    }


Started this thread Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 484
Thanks Received: 1,629

Gabriel123,

it appears you simply copied and pasted the EasyLanguge code into the default signal template. This won't work unfortunately, as you are trying to mix two programming languages. MC.NET uses C# and unless you rewrite your code into C# it won't compile.

If you are able to code in C# I would suggest to take a look at the Multicharts.NET Programming Guide and check the build in RSI and Average indicators to see how they are implemented in MC.NET.

In case you are new to or want to start with C# I would suggest to start with a basic tutorial first, before trying to code an automated trading system in C#. Once you have a good understanding of the basics you might want to consider reading @Jura 's excellent website https://www.tradingcode.net for a better understanding of the specifics for MC.NET.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on August 5, 2016


© 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