NexusFi: Find Your Edge


Home Menu

 





Help with Strategy Dev in MC


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one Zhorny with 5 posts (0 thanks)
    2. looks_two Bimi with 4 posts (0 thanks)
    3. looks_3 NW27 with 3 posts (1 thanks)
    4. looks_4 Big Mike with 1 posts (0 thanks)
    1. trending_up 5,457 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 13 posts
    2. attach_file 1 attachments




 
Search this Thread

Help with Strategy Dev in MC

  #11 (permalink)
 NW27 
Newcastle, Australia
 
Experience: Intermediate
Platform: Multicharts 8 - Full Version
Broker: IB
Trading: SPI,FTSE100, 6E, 6A
Posts: 285 since Oct 2010
Thanks Given: 108
Thanks Received: 188

Also, the Close is updated on every tick, so on a 5min chart this code code be processed 100's of times.
You need to look at the bar status to determine the actual close time of the 5min bar.

Regards,
Neil.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
About a successful futures trader who didnt know anythin …
Psychology and Money Management
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
REcommedations for programming help
Sierra Chart
 
  #12 (permalink)
 Zhorny 
London
 
Experience: Master
Platform: NinjaTrader
Trading: FX
Posts: 10 since Oct 2012
Thanks Given: 0
Thanks Received: 0

Thanks for the advice. Appreciate it.
As I mentioned before, I'm extremely new at this so how would I seperate buy orders on different bars?

Let's use buy only for this example: if the first bar's close is greater than the previous bar's close (Close[0]>Close[1]) then buy. Then if the next bar's close follows the same rule (Close[0]>Close[1]) buy again and so on until (Close[0]<Close[1]).

To stop buying 1000s on each bar I've limited the quantity amount:


Quoting 
inputs: Quantity( 1 );

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

if condition1 then buy ( "BTO" ) 1 Quantity this bar on Close;

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


Started this thread Reply With Quote
  #13 (permalink)
 NW27 
Newcastle, Australia
 
Experience: Intermediate
Platform: Multicharts 8 - Full Version
Broker: IB
Trading: SPI,FTSE100, 6E, 6A
Posts: 285 since Oct 2010
Thanks Given: 108
Thanks Received: 188



Zhorny View Post

To stop buying 1000s on each bar I've limited the quantity amount:

A few things you must understand:
1. Everyone time a tick comes in your code is processed.
2. The close price is the price of the last tick. Not the close of the 5min bar.
3. To find the tick that corresponds to the close of the 5min bar, you must look at the bar status.
4. Because each tick has it's own close price that may be > than the prior bar close, this is how you end up owning lots of contracts but purchased one at a time as per your buy line of code.

Regards,
Neil.

Reply With Quote
  #14 (permalink)
 Seberbach 
Midland, Michigan USA
 
Experience: Advanced
Platform: TradeStation, Biocomp
Trading: TF
Posts: 21 since Aug 2010
Thanks Given: 71
Thanks Received: 22

I use both Multicharts and TradeStation, and I find that most strategies written for TradeStation work with little or no modification on both platforms.

I have been learning how to program strategies in Easylanguage for almost 8 years, and am partly expert, partly just a beginner. There are many new programs still unwritten in Easylanguage, just as there are many novels and other valuable writings still unwritten in English.


While it might seem obvious to try this, perhaps you have not yet tried running some tutorial example programs for TradeStation in Multicharts. A good way to import these is to copy and paste the text versions into the Multicharts editor and compile them. Any incompatibilities will be flagged for you, and you will have a format (text codes) compatible with both platforms and even your own English! You can pick a working strategy similar to your ideas and change the instructions to fit your needs. I have found that method of learning easier than memorizing all the rules of syntax for a new language. Soon you will be up to enough speed that you can write your own "template" strategies to get you started on new projects. I doubt you will ever be satisfied with standing pat using only the first program idea you came up with!

Just Google:
Google

https://www.google.com/#hl=en&nfpr=1&q=free+easylanguage+tutorials&sa=X&ei=QySYUNeIPJPUyQG7y4CQBA&ved=0CBwQvgUoAQ&bav=on.2,or.r_gc.r_pw.r_qf.&fp=bc511441ea7da2f1&bpcl=37189454&biw=1606&bih=853

Note Google may try to give you "easy language" instead of "easylanguage". Just keep trying.....

There is an offer by TradeStation for "free" Forex-only accounts and a specialized version of TradeStation which you can use to leverage their tutorials and forums.....and of course Multicharts has a fine development environment for EasyLanguage and back testing. RTSoft is developing a Multicharts plug-in which will allow you to use the TradeStation brokerage accounts and data "as if" you were using the full TradeStation paid-up package. I have no idea yet what that will cost, but it looks quite interesting indeed.

Reply With Quote




Last Updated on November 5, 2012


© 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