VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy - MultiCharts | futures io social day trading
futures io futures trading


VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy
Updated: Views / Replies:24,671 / 39
Created: by Big Mike Attachments:16

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 90,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

Reply
 16  
 
Thread Tools Search this Thread
 

VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy

  #1 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received

VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy

Last year I did a video tutorial on creating an advanced NinjaTrader strategy, and you guys liked it. So I thought that since I don't use NT any more it would be a good idea to do the same strategy as an example in EasyLanguage with MultiCharts.

First, here is a link to the NinjaTrader Video Tutorial:
https://futures.io/ninjatrader/2512-video-tutorial-how-create-advanced-ninjatrader-strategy.html

OK, so in this video I show you how to create a strategy with optimizable parameters such as SMA length, EMA length, HMA length, three different targets, a stop, and the option to move target 2 to breakeven after target 1 is hit, as well as an option to move target 3 to breakeven after target 2 is hit.



Remember, this strategy is just an example! It took only a few minutes to write, and even though it shows to be profitable - it isn't (it won't be). Simple strategies are usually best to avoid curve fitting, but this one is too simple to actually work fully automated. A good strategy may take dozens of hours to create.

This example was created just so you could get your feet wet and learn some of the basics of strategy creation in MultiCharts or EasyLanguage.

Mike

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.
6)
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
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received

Here is the code for jtHMA function if you need it:

 
Code
                            


{jtHMA Hull Moving Average Function}
{
AuthorAtavachron}
{
May 2005}

Inputsprice(NumericSeries), length(NumericSimple);
VarshalvedLength(0), sqrRootLength(0);

{
Original equation is:
---------------------
waverage(2*waverage(close,period/2)-waverage(close ,period), SquareRoot(Period)
Implementation below is more efficient with lengthy Weighted Moving Averages.
In additionthe length needs to be converted to an integer value after it is halved and
its square root is obtained in order for this to work with Weighted Moving Averaging
}

if ((
ceiling(length 2) - (length 2)) <= 0.5then
halvedLength 
ceiling(length 2)
else
halvedLength floor(length 2);

if ((
ceiling(SquareRoot(length)) - SquareRoot(length)) <= 0.5then
sqrRootLength 
ceiling(SquareRoot(length))
else
sqrRootLength floor(SquareRoot(length));

Value1 WAverage(pricehalvedLength);
Value2 WAverage(pricelength);
Value3 WAverage((Value1 Value2), sqrRootLength);

jtHMA Value3
Mike

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.
6)
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 8 users say Thank You to Big Mike for this post:
 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received


Here is the code for the strategy created in our video example. I've also attached a MultiCharts pla to make it easy for importing, and that pla also contains the jtHMA function (since HMA is not built-in to MultiCharts).

 
Code
                            


{
Big Mike Trading https://futures.io
June 2011
}


inputs:
    
smalength 200 ),
    
emalength 100 ),
    
hmalength 34 ),
    
target1 12 ),
    
target2 12 ),
    
target3 20 ),
    
stopsize 12 ),
    
BE2 ), // 0=false, 1=true
    
BE3 ); // 0=false, 1=true
    
vars:
    
TickSize    MinMove PriceScale ),
    
smav        ),
    
emav        ),
    
hmav        ),
    
t1        Target1 TickSize ),
    
t2        ( (Target1 Target2) * TickSize ),
    
t3        ( (Target1 Target2 Target3) * TickSize ),
    
st1        ),
    
st2        ),
    
st3        );
    
smav Average(Closesmalength);
emav XAverage(Closeemalength);
hmav jtHMA(Closehmalength);


// open new positions

if MarketPosition 0 then begin

    
if smav smav[1] and emav emav[1] and hmav hmav[1then begin
    
        Buy 
("Enter long"3 Contracts Next Bar At Market;
    
    
end

    if 
smav smav[1] and emav emav[1] and hmav hmav[1then begin
    
        SellShort 
("Enter short"3 Contracts Next Bar At Market;
    
    
end
end;

// manage open orders

if MarketPosition 1 then begin

    st1 
EntryPrice - (stopsize TickSize);
    
st2 iff(BE2 1EntryPriceEntryPrice - (stopsize TickSize));
    
st3 iff(BE3 1EntryPriceEntryPrice - (stopsize TickSize));
    
    if 
CurrentContracts 1 then begin
        Sell 
("Exit l3-c1 Target"1 Contracts Next Bar At (EntryPrice t3Limit;
        
Sell ("Exit l3-c1 Stop"1 Contracts Next Bar At st3 Stop;
    
end;

    if 
CurrentContracts 2 then begin
        Sell 
("Exit l2-c2 Target"1 Contracts Next Bar At (EntryPrice t2Limit;
        
Sell ("Exit l2-c2 Stop"1 Contracts Next Bar At st2 Stop;
        
Sell ("Exit l3-c2 Target"1 Contracts Next Bar At (EntryPrice t3Limit;
        
Sell ("Exit l3-c2 Stop"1 Contracts Next Bar At st3 Stop;
    
end;
    
    if 
CurrentContracts 3 then begin
        Sell 
("Exit l1-c3 Target"1 Contracts Next Bar At (EntryPrice t1Limit;
        
Sell ("Exit l1-c3 Stop"1 Contracts Next Bar At st1 Stop;
        
Sell ("Exit l2-c3 Target"1 Contracts Next Bar At (EntryPrice t2Limit;
        
Sell ("Exit l2-c3 Stop"1 Contracts Next Bar At st2 Stop;
        
Sell ("Exit l3-c3 Target"1 Contracts Next Bar At (EntryPrice t3Limit;
        
Sell ("Exit l3-c3 Stop"1 Contracts Next Bar At st3 Stop;
    
end;
end;

if 
MarketPosition = -1 then begin

    st1 
EntryPrice + (stopsize TickSize);
    
st2 iff(BE2 1EntryPriceEntryPrice + (stopsize TickSize));
    
st3 iff(BE3 1EntryPriceEntryPrice + (stopsize TickSize));
    
    if 
CurrentContracts 1 then begin
        BuyToCover 
("Exit s3-c1 Target"1 Contracts Next Bar At (EntryPrice t3Limit;
        
BuyToCover ("Exit s3-c1 Stop"1 Contracts Next Bar At st3 Stop;
    
end;

    if 
CurrentContracts 2 then begin
        BuyToCover 
("Exit s2-c2 Target"1 Contracts Next Bar At (EntryPrice t2Limit;
        
BuyToCover ("Exit s2-c2 Stop"1 Contracts Next Bar At st2 Stop;
        
BuyToCover ("Exit s3-c2 Target"1 Contracts Next Bar At (EntryPrice t3Limit;
        
BuyToCover ("Exit s3-c2 Stop"1 Contracts Next Bar At st3 Stop;
    
end;
    
    if 
CurrentContracts 3 then begin
        BuyToCover 
("Exit s1-c3 Target"1 Contracts Next Bar At (EntryPrice t1Limit;
        
BuyToCover ("Exit s1-c3 Stop"1 Contracts Next Bar At st1 Stop;
        
BuyToCover ("Exit s2-c3 Target"1 Contracts Next Bar At (EntryPrice t2Limit;
        
BuyToCover ("Exit s2-c3 Stop"1 Contracts Next Bar At st2 Stop;
        
BuyToCover ("Exit s3-c3 Target"1 Contracts Next Bar At (EntryPrice t3Limit;
        
BuyToCover ("Exit s3-c3 Stop"1 Contracts Next Bar At st3 Stop;
    
end;
    
end
Mike

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.
6)
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.

Attached Files
Register to download File Type: pla BMT_MoneyMaker.pla (13.4 KB, 290 views)
Reply With Quote
The following 17 users say Thank You to Big Mike for this post:
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received

Here is a follow-up. This is a 1-year backtest on the EUR/USD, 6 range chart, with $2 commission per side and $12.50 slippage per contract.

Results came back with 28k net profit on 2,159 trades, 40% win rate, w/l ratio of 1.56. However, when you look at the equity curve and other performance metrics, you'll see this strategy needs work. As expected. This video was just an example, you could use it as a starting point.

Mike

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.
6)
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.

Attached Thumbnails
VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-15-15-pm.png   VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-17-11-pm.png   VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-18-12-pm.png   VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-18-59-pm.png   VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-19-55-pm.png   VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-20-05-pm.png   VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-20-19-pm.png   VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy-6-4-2011-4-21-27-pm.png  
Reply With Quote
The following 12 users say Thank You to Big Mike for this post:
 
  #5 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received

Feel free to make a request for future video tutorials in this thread.

Mike

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.
6)
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 2 users say Thank You to Big Mike for this post:
 
  #6 (permalink)
Elite Member
Palm Beach County
 
Futures Experience: Advanced
Platform: OEC about to change to Ninja
Favorite Futures: ES ,EUR/USD
 
Posts: 179 since Feb 2011
Thanks: 66 given, 89 received

Thank you for the presentation....very useful to a 'dumb techy' like me...worth a laugh when you apologized for having to type 'slow'...in comparison to the Ninja video where I had to hit the "pause" button a million times to follow what you were doing.

Hope your hand/wrist are healing well..

Trader

Reply With Quote
The following 2 users say Thank You to Family Trader for this post:
 
  #7 (permalink)
Elite Member
Taipei/Taiwan
 
Futures Experience: Beginner
Platform: Multicharts/NinjaTrader
Broker/Data: AMP/CQG
Favorite Futures: ES
 
Posts: 42 since Oct 2011
Thanks: 139 given, 25 received


Big Mike View Post
Here is a follow-up. This is a 1-year backtest on the EUR/USD, 6 range chart, with $2 commission per side and $12.50 slippage per contract.

Results came back with 28k net profit on 2,159 trades, 40% win rate, w/l ratio of 1.56. However, when you look at the equity curve and other performance metrics, you'll see this strategy needs work. As expected. This video was just an example, you could use it as a starting point.

Mike

Very good to show me for the multiple contracts control in the MC..
Well, the MDD seems quite huge... for such strategy...
Thanks for your sharing, anyway,, I learned a lot!!
Wish for sharing more MC coding examples...

-Steel

Reply With Quote
 
  #8 (permalink)
Trading Apprentice
Plzeň
 
Futures Experience: None
Platform: MultiCharts
Favorite Futures: Stocks
 
Posts: 3 since May 2012
Thanks: 0 given, 0 received

Question

Hi Big Mike,
could you help me please with writing this simple strategy in EasyLanguage?

Strategy:

Indicators - EMA(x), SMA(y), MACD(m,n,o), CCI(p); where x<y

Our pozition is everytime e.g. 5 % of 100000$ - initial capital.

Bull's position:

Signal for entry- EMA(x) crosses up SMA(y), where x<y, and MACD>=0 ∧ CCI>=0

Moment of entry - closing price of the candle, in which crossover hapend

STOPLOSS - minimum of the candle, which is the lowest in recent x days, where x is EMA's period, (I think it is called SWING LOW) and it moves with time

PROFIT TARGET - is in the same distance like STOPLOSSE every time and when we achieve it, we close half amount of our position

Signal for exit- EMA(x) crosses down SMA(y), where x<y, in this moment we sell the second half of position or whole position in that case we didn't achieve PROFIT TARGET yet.

Bear's position
the rules are same but vice versa


That's it and I have also one suggestion for next video tutorial - how backtest portfolio in MultiCHarts

Thank you for any help
and I'm sorry for my bad English

Reply With Quote
 
  #9 (permalink)
Trading Apprentice
Plzeň
 
Futures Experience: None
Platform: MultiCharts
Favorite Futures: Stocks
 
Posts: 3 since May 2012
Thanks: 0 given, 0 received

Hi,
I wrote some code according to the video and my trading rules above and tried it
on day chart of google, but it doesn't make any trades...is the algorithm correct?

Thanks very much

CODE:
---------------------------------------------------------------------------------------------------------------
inputs:

smalength ( 26 ),

emalength ( 8 ),

macdfastlength ( 5 ),

macdslowlength ( 10 ),

ccilength (14);



vars:

TickSize ( MinMove / PriceScale ),

smav ( 0 ),

emav ( 0 ),

macdv ( 0 ),

cciv ( 0 ),

money ( 70000 ),

stocks ( Close/money ),

tar ( 0 ),

st ( Close ),

timer ( 0 );



smav = Average(Close, smalength);

emav = XAverage(Close, emalength);

macdv = MACD(Close, macdfastlength , macdslowlength);

cciv = CCI(ccilength);


// open new positions


if MarketPosition = 0 then begin


if emav crosses over smav then begin
alert("prekrizeni nahoru");
if macdv >= 0 and cciv >= 0 then begin


Buy ("Enter long") stocks Contracts Next Bar At Market;

end;

end;


if emav crosses under smav then begin

if macdv < 0 and cciv < 0 then begin


SellShort ("Enter short") stocks Contracts Next Bar At Market;

end;

end;
end;

// manage open orders


if MarketPosition = 1 then begin // 1 - means long position opened

for timer = 0 to emalength - 1 begin
if st > Close[timer] then begin
st = Close[timer]; // stoploss on the swing low
end;
end ;
tar = Close + (Close - st);


Sell ("Exit long Target") stocks/2 Contracts Next Bar At tar Limit;

Sell ("Exit long Stop") currentcontracts Contracts Next Bar At st Stop;

end;



if MarketPosition = -1 then begin // -1 - means short position opened

for timer = 0 to emalength - 1 begin
if st < Close[timer] then begin
st = Close[timer]; // stoploss on the swing high
end;
end ;
tar = Close - (st - Close);



BuyToCover ("Exit short Target") stocks/2 Contracts Next Bar At tar Limit;

BuyToCover ("Exit short Stop") currentcontracts Contracts Next Bar At st Stop;

end;

Reply With Quote
 
  #10 (permalink)
Elite Member
Los Angeles, CA
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: Tradestation
Favorite Futures: ES,HG,GC,YM,Nq,RB,NG
 
Posts: 52 since Aug 2011
Thanks: 11 given, 8 received


Hi Mike,

In your example, what if your profit or stop loss gets hit on the entry bar. How can you make it so that it will exit on the entry bar and not on the next bar?




Big Mike View Post
Here is a follow-up. This is a 1-year backtest on the EUR/USD, 6 range chart, with $2 commission per side and $12.50 slippage per contract.

Results came back with 28k net profit on 2,159 trades, 40% win rate, w/l ratio of 1.56. However, when you look at the equity curve and other performance metrics, you'll see this strategy needs work. As expected. This video was just an example, you could use it as a starting point.

Mike


Reply With Quote

Reply



futures io > > > > VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy Big Mike NinjaTrader 63 November 6th, 2016 03:25 PM
VIDEO: MultiCharts vs. NinjaTrader strategy backtesting and optimization Big Mike MultiCharts 53 June 12th, 2016 02:34 PM
Anyone know of good video tutorial for C# language? whoisthere48 NinjaTrader Programming 11 April 1st, 2012 06:33 PM
Is there a video tutorial on creating a NT indicator (in 6.5)? Thanks. aquarian1 NinjaTrader 9 May 16th, 2011 06:56 PM
VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy Big Mike NinjaTrader Programming 0 January 26th, 2010 06:22 AM


All times are GMT -4. The time now is 06:17 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-12-17 in 0.09 seconds with 19 queries on phoenix via your IP 54.82.81.154