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>Close) then buy. Then if the next bar's close follows the same rule (Close>Close) buy again and so on until (Close<Close).
To stop buying 1000s on each bar I've limited the quantity amount:
Last edited by Zhorny; November 2nd, 2012 at 04:50 AM.
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.
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!
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.
Last edited by Seberbach; November 5th, 2012 at 03:43 PM.
Reason: force google to be more specific