EasyLanguage Collective2 Interface (MultiCharts to Collective 2) - EasyLanguage Programming | futures io social day trading
futures io futures trading


EasyLanguage Collective2 Interface (MultiCharts to Collective 2)
Updated: Views / Replies:16,147 / 41
Created: by Big Mike Attachments:0

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
 
Thread Tools Search this Thread
 

EasyLanguage Collective2 Interface (MultiCharts to Collective 2)

  #21 (permalink)
Elite Member
Montreal, Canada
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: Interactive Broker
Favorite Futures: Forex
 
Posts: 262 since Sep 2010
Thanks: 436 given, 86 received


Big Mike View Post
Take it one step at a time and tell me specifically/exactly what step you do not understand or where you have a problem.

BTW, this entire solution requires some computer knowledge, so if you are not a PC guru then this method is not for you.

Mike

Hello Sam

I will put this project on the side for some time.

I realise that, even if my strategy is interesting and return very nice profit for the last 12 months, I still have work to do on it. I got extended periods with gain floating around a profit level. This could be discouraging if someone entered in the strategy at this period.

Also, the project for an external server will have to be process first.

Martin

Reply With Quote
 
  #22 (permalink)
Trading Apprentice
Versailles
 
Futures Experience: None
Platform: Multicharts
Broker/Data: None
 
Posts: 8 since Mar 2010
Thanks: 0 given, 0 received

big problem with xreplace

Hello everybody!

I've got problem to implement the "xreplace" C2 function, which replaces the SL for example; but to do that, we need a "signal stop ID" which is given by a response-xml to our first order (signal). So my autostrat can't know it...
My SL often changes so I'm a bit lost with this.

MC says that they will implement C2 in their code but no deadline...

any idea?

Thank u all.

Reply With Quote
 
  #23 (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,238 since Jun 2009
Thanks: 29,350 given, 83,218 received



NicoVersailles View Post
Hello everybody!

I've got problem to implement the "xreplace" C2 function, which replaces the SL for example; but to do that, we need a "signal stop ID" which is given by a response-xml to our first order (signal). So my autostrat can't know it...
My SL often changes so I'm a bit lost with this.

MC says that they will implement C2 in their code but no deadline...

any idea?

Thank u all.

You would need something more elaborate than what I provided to read the response file. wget is storing the response file, so it's just a matter of reading/parsing the data. I'm not sure if there is an EasyLanguage function to read from a text file or not, but if so, shouldn't be too hard from there.

Another approach would be to handle that part via dos command line instead of easylanguage entirely, just keeping the signal ID outside of easylanguage and knowing that when you do a xreplace, you need to provide it. Just need some basic dos scripting or windows powershell.

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
 
  #24 (permalink)
Elite Member
London
 
Futures Experience: Beginner
Platform: MultiCharts
 
Posts: 230 since Nov 2010
Thanks: 10 given, 20 received

Do you ask at team of collective2 or mujlticharts in project managment to implement thisd feautures?

I think that is better interface certificated by multicharts than own code.

Reply With Quote
 
  #25 (permalink)
Trading Apprentice
China
 
Futures Experience: Intermediate
Platform: TradeStation,MultiCharts
Favorite Futures: ES
 
Posts: 1 since Jun 2011
Thanks: 1 given, 0 received

MultiCharts to Collective2 signal interface

Hi Big Mike,
Learn from Stan of MC that you've developed the interface, can you send me a copy ?
Currently I have a test system in Collective 2.

Thanks !

Reply With Quote
 
  #26 (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,238 since Jun 2009
Thanks: 29,350 given, 83,218 received


Simon Li View Post
Hi Big Mike,
Learn from Stan of MC that you've developed the interface, can you send me a copy ?
Currently I have a test system in Collective 2.

Thanks !

Everything is posted 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
 
  #27 (permalink)
Membership Permanently Revoked
Mesa, AZ
 
Futures Experience: Beginner
Platform: Multicharts
Favorite Futures: ES
 
Posts: 55 since Oct 2010
Thanks: 12 given, 16 received

starting to play with this and have a couple questions. Mainly don't understand the first part or function code part..

1) The function code.. is this C or easylanguage? What does file get saved as including extension? Not sure how MC accesses this
2) The code shows up here with "winks" and cut and pasting the code is creating problems I think.. also there are spaces where there shouldn't be spaces I think. Can you please post as an attachment?

Reply With Quote
 
  #28 (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,238 since Jun 2009
Thanks: 29,350 given, 83,218 received

1. All EasyLanguage. For the function, you go to PowerLanguage editor and do New - Function. For strategy signal, you do new - signal.

2. The winks is a bug, and I am waiting for a fix. For now, you can replace winks with ), or if you reply to my post w/the code, you should be able to see the code as was intended w/o the smiley markup. I can't attach as a PLA because I no longer have this version of the code on my system.

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
 
  #29 (permalink)
Membership Permanently Revoked
Mesa, AZ
 
Futures Experience: Beginner
Platform: Multicharts
Favorite Futures: ES
 
Posts: 55 since Oct 2010
Thanks: 12 given, 16 received

replying with code to see code correctly w/o winks.

// Big Mike Trading https://futures.io
// Apr 5 2010

{ C2 Signal Entry API }

{
Parameter Value or Example What it Means Comments
cmd= signal
systemid= 123456 The system ID displayed as above.
pw= loginPassword case sensitive
action= BTO Buy To Open open a long position
SSHORT Sell Short used for stocks
STO Sell To Open used for non-stocks
BTC Buy To Close close a short positio n
STC Sell To Close close a long positio n
quant= 100 Number of shares or contracts
instrument= stock Note that ETFs like QQQ and DIA are traded on a stock exchange and thus are considered stocks.
option
future
forex
symbol= IBM You are responsible for looking up your own symbols. If you trade Forex, you know that Collective2 figures out Forex symbol s automatically when you manually enter trades on the Web site. However, you'll need to enter already-valid symbols when using the Web service interface .
limit= 35.06 Only use if this is a l imit order.
stop= 20.10 Only use if this is a st op order. For market orders, do not use either sto p or limit parameters.
duration= DAY Day Order
GTC Good Til Cancel

}

{
The URL is in the following format:

http://www.collective2. com/cgi-perl/signal. mpl?[PARAMETERS]
}

inputs:
cmd ( StringSimple , { signal, closeallpositi ons }
systemid ( NumericSimple , { c2 system id }
pw ( StringSimple , { c2 password for said id }
action ( StringSimple , { BTO, SSHORT, STO, B TC, STC }
quant ( NumericSimple , { order quantity }
instrument ( StringSimple , { stock, option, future, forex }
c2symbol ( StringSimple , { symbol for instru ment }
c2limit ( NumericSimple , { optional }
c2stop ( NumericSimple , { optional buy s top/sell stop }
c2target ( NumericSimple , { target price, 0 for none, use with stoploss for OCO }
c2stoploss ( NumericSimple , { stop loss pric e, 0 for none, use with target for OCO }
duration ( StringSimple ; { DAY, GTC }

vars:
result ( 0 ,
filename ( "C:\Users\Mike\Documents\MultiCharts\Collective2\si gnal.txt" ,
c2baseurl ( "http://www.collective2.com/cgi-perl/signal.mpl?" ,
c2query ( "null" ;


if cmd = "signal" then begin
c2query = text(c2baseurl, "cmd=", cmd, "&systemid=", systemid:0:0, "&pw=", pw, "&action=", action, "&quant=", quant:0:0, "&instrument=", instrument, "&symbol=", c2symbol, "&duration=", duration);

if c2limit > 0 then c2query = c2query + "&limit=" + text(c2limit:0:2);
if c2stop > 0 then c2query = c2query + "&stop=" + text(c2stop:0:2);
if c2target > 0 then c2query = c2query + "&profittarget=" + text(c2target:0:2);
if c2stoploss > 0 then c2query = c2query + "&stoploss=" + text(c2stoploss:0:2);
end;

if cmd = "closeallpositions" then begin
c2query = text(c2baseurl, "cmd=", cmd, "&systemid=", systemid:0:0, "&pw=", pw);

end;

if GetAppInfo(aiRealTimeCalc) = 1 then FileAppend( filename,c2query + newline);
Text_New(date, time, C, text("c2: ", cmd, action, quant:0:0));
if c2target > 0 then Text_New(date, time, c2target , text("c2: target ", c2target:0:2));
if c2stoploss > 0 then Text_New(date, time, c2stop loss, text("c2: stop ", c2stoploss:0:2));

Reply With Quote
 
  #30 (permalink)
Membership Permanently Revoked
Mesa, AZ
 
Futures Experience: Beginner
Platform: Multicharts
Favorite Futures: ES
 
Posts: 55 since Oct 2010
Thanks: 12 given, 16 received


Having trouble getting my strategy to compile with the code


If marketposition = 0 then begin

If dma > dma[1] and condition99 then begin//buy contractsize contracts next bar at market;
Value1 = collective2("signal", c2id, c2pw, "BTO", 1, "future", "QCLQ1", 0, 0, (Close + (100 * MinMove/PriceScale)), (Close - (100 * MinMove/PriceScale)), "DAY");
end;

If dma < dma[1] and condition99 then begin //sellshort contractsize contracts next bar at market;
Value1 = collective2("signal", c2id, c2pw, "STO", 1, "future", "QCLQ1", 0, 0, (Close + (100 * MinMove/PriceScale)), (Close - (100 * MinMove/PriceScale)), "DAY");
end;

end;

getting error message

------ Compiled with error(s): ------
Types are not compatible
errLine 120, errColumn 0, errLineEnd 120, errColumnEnd 0
causal study: (Function)

line 120 is the value1... line

any idea what I am doing wrong here?

Reply With Quote

Reply



futures io > > > > > EasyLanguage Collective2 Interface (MultiCharts to Collective 2)

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy Big Mike MultiCharts 39 November 9th, 2017 04:35 AM
Global Variables (GV) in EasyLanguage for TradeStation/MultiCharts Big Mike EasyLanguage Programming 19 October 29th, 2013 04:07 PM
BMT Collective MA Blz17 The Elite Circle 31 March 2nd, 2012 11:59 AM
Using EleXcel, interface to Excel arjfca MultiCharts 2 June 16th, 2011 09:18 AM
OHLCPeriodsAgo EasyLanguage/MultiCharts ccfeldt EasyLanguage Programming 4 April 6th, 2011 08:23 AM


All times are GMT -4. The time now is 06: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-12 in 0.13 seconds with 19 queries on phoenix via your IP 54.145.51.250