Help with Strategy Dev in MC - MultiCharts | futures io social day trading
futures io futures trading


Help with Strategy Dev in MC
Updated: Views / Replies:2,141 / 13
Created: by Zhorny 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 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
 1  
 
Thread Tools Search this Thread
 

Help with Strategy Dev in MC

  #1 (permalink)
Elite Member
London
 
Futures Experience: Master
Platform: NinjaTrader
Favorite Futures: FX
 
Posts: 10 since Oct 2012
Thanks: 0 given, 0 received

Help with Strategy Dev in MC

Hi there,

I have very little experience in programming and want to create a very simple trading strategy in MultiCharts.

BUY = If Close (0) > Close (-1) -- buy if close of the current bar is greater than the close of the previous bar AND keep buying if this rule continues i.e. if there are 5 bars in a row each with the close higher than the previous bar then you will have a net LONG 5 lot position.

SELL = If Close (0) < Close (-1) -- sell if close of the current bar is less than the close of the previous bar AND keep selling if this rule continues i.e. if there are 5 bars in a row each with the close lower than the previous bar then you will have a net SHORT 5 lot position.

CLOSE entire LONG position when a SELL signal appears and open a SHORT as per the rule
CLOSE entire SHORT position when a BUY signal appears and open a LONG position as per the rule

I've highlighted two examples in the attached screenshot of how this rule should work.

Default Quantity = 1 lot i.e. every time I open or add to a current position I will only trade 1 lot.

When a reverse signal comes into effect i.e. "Close Longs - Open Short" I would sell off my entire long position and then open 1 position short.

Feedback appreciated.
Thank you

Attached Thumbnails
Help with Strategy Dev in MC-example.png  
Reply With Quote
 
  #2 (permalink)
Trading for Fun
London
 
Futures Experience: None
Platform: mc, TS, ninja
Favorite Futures: es
 
Bimi's Avatar
 
Posts: 118 since Mar 2010
Thanks: 42 given, 58 received


Zhorny View Post
Hi there,

I have very little experience in programming and want to create a very simple trading strategy in MultiCharts.

BUY = If Close (0) > Close (-1) -- buy if close of the current bar is greater than the close of the previous bar AND keep buying if this rule continues i.e. if there are 5 bars in a row each with the close higher than the previous bar then you will have a net LONG 5 lot position.

SELL = If Close (0) < Close (-1) -- sell if close of the current bar is less than the close of the previous bar AND keep selling if this rule continues i.e. if there are 5 bars in a row each with the close lower than the previous bar then you will have a net SHORT 5 lot position.

CLOSE entire LONG position when a SELL signal appears and open a SHORT as per the rule
CLOSE entire SHORT position when a BUY signal appears and open a LONG position as per the rule

I've highlighted two examples in the attached screenshot of how this rule should work.

Default Quantity = 1 lot i.e. every time I open or add to a current position I will only trade 1 lot.

When a reverse signal comes into effect i.e. "Close Longs - Open Short" I would sell off my entire long position and then open 1 position short.

Feedback appreciated.
Thank you

do you expect someone to write it for you?

Reply With Quote
 
  #3 (permalink)
Elite Member
London
 
Futures Experience: Master
Platform: NinjaTrader
Favorite Futures: FX
 
Posts: 10 since Oct 2012
Thanks: 0 given, 0 received


Cheers for your super constructive feedback.
All I was after were a few pointers on how to code BUY and SELL orders etc.

Reply With Quote
 
  #4 (permalink)
Trading for Fun
London
 
Futures Experience: None
Platform: mc, TS, ninja
Favorite Futures: es
 
Bimi's Avatar
 
Posts: 118 since Mar 2010
Thanks: 42 given, 58 received


Zhorny View Post
Cheers for your super constructive feedback.
All I was after were a few pointers on how to code BUY and SELL orders etc.

have you read the manual?
have you given anything a try?

Reply With Quote
 
  #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,352 given, 83,230 received

I no longer use MC, but some basics are covered here:

https://futures.io/multicharts/11278-video-tutorial-how-create-advanced-multicharts-easylanguage-strategy.html

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
 
  #6 (permalink)
Trading for Fun
London
 
Futures Experience: None
Platform: mc, TS, ninja
Favorite Futures: es
 
Bimi's Avatar
 
Posts: 118 since Mar 2010
Thanks: 42 given, 58 received


Zhorny View Post
Cheers for your super constructive feedback.
All I was after were a few pointers on how to code BUY and SELL orders etc.



I am not trying to be hash, but seriously, if you want help, you have to show a little bit effort too.

Reply With Quote
 
  #7 (permalink)
Elite Member
London
 
Futures Experience: Master
Platform: NinjaTrader
Favorite Futures: FX
 
Posts: 10 since Oct 2012
Thanks: 0 given, 0 received

I have only gotten this far but do not know if it is a) correct or b) how to close off positions:

inputs: Quantity( 1 );

condition1 = Close > Close[1]
condition2 = Close < Close[1]

if condition1 then
buy ( "BTO" ) Quantity next bar at market;

if condition2 then
sell next bar at market

end;

if condition2 then
sellshort ( "STO") Quantity next bar at market;

if condition1 then
buytocover next bar at market

end;
end;


I get an error after compiling:
syntax error, expecting 'bars'
errLine 4, errColumn 0, errLineEnd 4, errColumnEnd 0
causal study: (Function)


Last edited by Zhorny; November 1st, 2012 at 01:20 PM.
Reply With Quote
 
  #8 (permalink)
Trading for Fun
London
 
Futures Experience: None
Platform: mc, TS, ninja
Favorite Futures: es
 
Bimi's Avatar
 
Posts: 118 since Mar 2010
Thanks: 42 given, 58 received


Zhorny View Post
I have only gotten this far but do not know if it is a) correct or b) how to close off positions:

inputs: Quantity( 1 );

condition1 = Close > Close[1]
condition2 = Close < Close[1]

if condition1 then
buy ( "BTO" ) Quantity next bar at market;

if condition2 then
sell next bar at market

end;

if condition2 then
sellshort ( "STO") Quantity next bar at market;

if condition1 then
buytocover next bar at market

end;
end;


I get an error after compiling:
syntax error, expecting 'bars'
errLine 4, errColumn 0, errLineEnd 4, errColumnEnd 0
causal study: (Function)


you need a semi-colon behind each statement.

Reply With Quote
 
  #9 (permalink)
Elite Member
London
 
Futures Experience: Master
Platform: NinjaTrader
Favorite Futures: FX
 
Posts: 10 since Oct 2012
Thanks: 0 given, 0 received

Making progress and I think I've got it after using the Repeat function although I'm still not sure it'll work.
I get an error that I have no idea what it means and don't see the problem (line 8 is the "buy("BTO")..." line).

Help appreciated.

------ Compiled with error(s): ------
Orders cannot be inside a loop.
errLine 8, errColumn 5, errLineEnd 8, errColumnEnd 5
causal study: (Function)




Quoting 
inputs: Quantity( 1 );

condition1 = Close[0] > Close[1];
condition2 = Close[0] < Close[1];

Repeat
if condition1 then
buy ( "BTO" ) this bar on close;
Until condition2;

if condition2 then
sell ( "STC" ) this bar on close;

Repeat
if condition2 then
sellshort ( "STO" ) this bar on close;
Until condition1;

if condition1 then
buytocover ( "BTC" ) this bar on close;



Last edited by Zhorny; November 1st, 2012 at 02:16 PM.
Reply With Quote
 
  #10 (permalink)
Elite Member
Newcastle, Australia
 
Futures Experience: Intermediate
Platform: Multicharts 8 - Full Version
Broker/Data: IB
Favorite Futures: SPI,FTSE100, 6E, 6A
 
Posts: 285 since Oct 2010
Thanks: 108 given, 177 received


Repeat
.......
Until
Is a loop. You can't put orders inside here.
Remember that this code is processed on EVERY incoming tick, so you would have purchase 1000's

Regards,
Neil.

Reply With Quote

Reply



futures io > > > > Help with Strategy Dev in MC

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
How much time do you spend on algo systems dev? Big Mike Elite Automated Trading 13 November 24th, 2012 03:48 PM
rotational trading strategy with MC.NET? jdfagan MultiCharts 1 September 25th, 2012 03:39 PM
Test same strategy on many symbols in MC nikke EasyLanguage Programming 3 January 29th, 2012 06:31 AM
MC: Simple strategy code problem / Easy Language true EasyLanguage Programming 4 December 19th, 2010 09:48 AM
Anyone here have a Zenfire dev account -- are they disabled over weekend? ptd26 Reviews of Brokers and Data Feeds 6 January 24th, 2010 12:44 AM


All times are GMT -4. The time now is 12:37 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-13 in 0.14 seconds with 20 queries on phoenix via your IP 54.221.93.187