Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
condition1 = var2 crosses over 0 ;
if condition1 then
Alert( "Bullish alert" )
else
begin
condition1 = var2 crosses under 0 ;
if condition1 then
Alert( "Bearish alert" ) ;
end;
if marketposition = 0
and currenttime > 0830
and Close > R1
and Close [1] > R1
and Close < R2
and var2 crosses under 0 then
sellshort 5 contracts data2 next bar at Market;
you can only issue orders on Data 1, trading on additional datastreams is not possible unfortunately.
You might need to consider using two charts and using the underlying stock as data 2 while you are using the long option as data1 on the first chart and the short option as data 1 on the second chart.
doesn't the stock symbol generate your trades? One assumption you could make would be that the same code using the same data generates signals on the two charts at the same time. So the two charts would be independent of each other.
If this isn't what you are looking for, you might be able to accomplish your goal using the Portfolio Trader or by synchronizing trade signals across the two charts via external DLLs.
Thanks ABCTG, I have been working with two similar charts and strategies to produce a credit spread when my signal hits. My problem now is I need to change the instrument in data1. It gives me a list of ten previous selections. How do you change data1 other than creating a new chart?
I am not sure if I understand exactly what you mean, as I am not aware of a list of previous selections in Multicharts that is for symbols. My guess would be that you are referring to the symbol list for a particular data provider and you are only seeing those that you added or that were pre-added. If that's the case simply add the symbols you are looking for, if not please elaborate what you mean and add a screenshot.
The underlying is data2. the option that is traded is data1. As price changes I need to change the strike price (change data1). The drop down in the data1 chart gives ten previous selections but the one I need is not in this list. I have not found a way to change it to something other than what is in that drop down. It probably cannot be done but I thought I would ask.