Hi,
What is the way to pass information from one chart to second chart.
Suppose on Chart number 1 indicator is running and I want that when that Chart 1 indicator is = 1 then
On chart Number 2 my strategy start placing orders.
and when on chart No.1 indicator become = -1 then
on chart No.2 my strategy stop placing orders.
Thanks
Code inquire: Pass information from 1st chart to 2nd chart
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Code inquire: Pass information from 1st chart to 2nd cha
Do a search in this forum forHi,
What is the way to pass information from one chart to second chart.
Suppose on Chart number 1 indicator is running and I want that when that Chart 1 indicator is = 1 then
On chart Number 2 my strategy start placing orders.
and when on chart No.1 indicator become = -1 then
on chart No.2 my strategy stop placing orders.
Thanks
GlobalVariables
if you want to do some advanced reading and programming,
search also for:
ELCollections
ADE ALL Data Everywhere
Re: Code inquire: Pass information from 1st chart to 2nd cha
I checked forum and found example on this page and it is working.Do a search in this forum for
GlobalVariables
if you want to do some advanced reading and programming,
search also for:
ELCollections
ADE ALL Data Everywhere
viewtopic.php?t=2483
Thanks
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Code inquire: Pass information from 1st chart to 2nd cha
Thanks for the follow up and the link... Much appreciated.I checked forum and found example on this page and it is working.Do a search in this forum for
GlobalVariables
if you want to do some advanced reading and programming,
search also for:
ELCollections
ADE ALL Data Everywhere
viewtopic.php?t=2483
Thanks
Re: Code inquire: Pass information from 1st chart to 2nd cha
In using the GV (Global Variable) approach, there are some issues ie, information obtained on the second chart using a GV is lost, as in if the chart is reloaded the past GV history is not there. No good for back testing etc.Hi,
What is the way to pass information from one chart to second chart.
Suppose on Chart number 1 indicator is running and I want that when that Chart 1 indicator is = 1 then
On chart Number 2 my strategy start placing orders.
and when on chart No.1 indicator become = -1 then
on chart No.2 my strategy stop placing orders.
Thanks
If however you are wanting to have two charts that are say a 25tick chart and a 5min chart and the 25tick chart generates the signals that are used on the 5min chart. It may be easier to have both of the data series on the same physical chart. You can have two chart data series and two charts displayed in the one data window or do as I do and have the second data series hidden. Reference the indicator in the second data series as in "average(Close of Data(2),20)"
Neil.
P.S. I also use this method for displaying a 20EMA of a 5min data onto a 25tick chart.
the 5min data is a second hidden data series. And when I place the MA onto the 25tick chart I tell it to use "2 - ..." not "1 -..." via the "Properties/Base Study on" area.
Note - The second Data series can also be a different instrument.
Re: Code inquire: Pass information from 1st chart to 2nd cha
In using the GV (Global Variable) approach, there are some issues ie, information obtained on the second chart using a GV is lost, as in if the chart is reloaded the past GV history is not there. No good for back testing etc.
If however you are wanting to have two charts that are say a 25tick chart and a 5min chart and the 25tick chart generates the signals that are used on the 5min chart. It may be easier to have both of the data series on the same physical chart. You can have two chart data series and two charts displayed in the one data window or do as I do and have the second data series hidden. Reference the indicator in the second data series as in "average(Close of Data(2),20)"
Neil.
P.S. I also use this method for displaying a 20EMA of a 5min data onto a 25tick chart.
the 5min data is a second hidden data series. And when I place the MA onto the 25tick chart I tell it to use "2 - ..." not "1 -..." via the "Properties/Base Study on" area.
Note - The second Data series can also be a different instrument.
I want do something which cann't be done by using Data(2). Already checked those options.
GV working but Yes, I figured out already that GV is not good. I need the data available for backtesting and GV does not support that feature.
I m trying to make ADE and ELCollections.dll work but so far no luck. Did it worked on ur computer?
Re: Code inquire: Pass information from 1st chart to 2nd cha
1. I'm curious as to why it would not work on Data2?I want do something which cann't be done by using Data(2). Already checked those options.
GV working but Yes, I figured out already that GV is not good. I need the data available for backtesting and GV does not support that feature.
I m trying to make ADE and ELCollections.dll work but so far no luck. Did it worked on ur computer?
2. I have not tried ADE or ELCollections. No need to, I can do everything I need with Data2
Neil.
Re: Code inquire: Pass information from 1st chart to 2nd cha
1. Bit complicated and private, cann't discuss.
1. I'm curious as to why it would not work on Data2?
2. I have not tried ADE or ELCollections. No need to, I can do everything I need with Data2
Neil.
2. ok
Plz any body in the forum used ADE and ELCollections please help me out here. I m unable to make them work.
- ABC
- Posts: 721
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 409 times
- Contact:
Re: Code inquire: Pass information from 1st chart to 2nd cha
Faraz,
if I tell you that ELCollections and ADE work fine for me and expect that this information should get you going, it wouldn't be very helpful for you.
The same applies for "I am unable to make it work", there are so many things that could cause problems, that in my opinion you won't get much help with this remark only. To make anyone able to help you should provide us with:
1. The steps you did already
2. The version of MC you are running
3. The version of the DLL you are using (to make sure you are using the 32 Bit DLL with the 32 Bit version of MC for examples)
4. Your operating system and if you have administrator rights with the account you log in with.
5. What error messages do you get with ELC or ADE?
This enables us to rule out certain problems and be specific about the help, which saves you time. This by the way applies to any problems with MC and programming, always give all the information that someone would need to reproduce the problem, as the solution could be in something you wouldn't have thought about.
Regards,
ABC
if I tell you that ELCollections and ADE work fine for me and expect that this information should get you going, it wouldn't be very helpful for you.
The same applies for "I am unable to make it work", there are so many things that could cause problems, that in my opinion you won't get much help with this remark only. To make anyone able to help you should provide us with:
1. The steps you did already
2. The version of MC you are running
3. The version of the DLL you are using (to make sure you are using the 32 Bit DLL with the 32 Bit version of MC for examples)
4. Your operating system and if you have administrator rights with the account you log in with.
5. What error messages do you get with ELC or ADE?
This enables us to rule out certain problems and be specific about the help, which saves you time. This by the way applies to any problems with MC and programming, always give all the information that someone would need to reproduce the problem, as the solution could be in something you wouldn't have thought about.
Regards,
ABC
Re: Code inquire: Pass information from 1st chart to 2nd cha
Faraz,
if I tell you that ELCollections and ADE work fine for me and expect that this information should get you going, it wouldn't be very helpful for you.
The same applies for "I am unable to make it work", there are so many things that could cause problems, that in my opinion you won't get much help with this remark only. To make anyone able to help you should provide us with:
1. The steps you did already
2. The version of MC you are running
3. The version of the DLL you are using (to make sure you are using the 32 Bit DLL with the 32 Bit version of MC for examples)
4. Your operating system and if you have administrator rights with the account you log in with.
5. What error messages do you get with ELC or ADE?
This enables us to rule out certain problems and be specific about the help, which saves you time. This by the way applies to any problems with MC and programming, always give all the information that someone would need to reproduce the problem, as the solution could be in something you wouldn't have thought about.
Regards,
ABC
ABC,
Thanks for ur reply. Sound good to me.
Here is what i did;
1) copy elcollections.dll in MC folder C:\Program Files\TS Support\MultiCharts
2) imported elcollection eld functions in MC
3) make ADE folder on C:
4) make 3 more (data, classes, code) folders in c:\ADE
5) moved ohlcv.txt file in to classes folder
6) imported ade.eld files to MC
7) created a indicator ADE Sender and put this code;
Code: Select all
Vars: Class("DailyAvg") , AvgMap(MapSN.New ), MA( 0 );
// CACULATE MOVING AVERAGE
MA = AverageFc(c,50);
//Store the data we are interested in into AvgMap
Value1 = MapSN.put(AvgMap,"DailyAvg", MA);
//Use ADE to store for current symbol and bar interval
Value1 = ADE.putBarinfo(class, GetsymbolName, ADE.Barinterval, ADE.BarID, AvgMap);
//plot daily average on daily chart
Plot1(MA, "Av", DarkBlue);
Code: Select all
vars: Interval(0), Class("DailyAvg"), AvgMap(Mapsn.new);
value1 = Ade.GetBarInfo(Class, GetSymbolName, Interval, Ade.BarID, AvgMap);
Value2 = MapSN.Get(AvgMap,"DailyAvg");
Plot1(Value2,"DailyAvg",Darkblue);
10) OS xp 32 bit
11) not sure if elcollections.dll file is 32 bit file as well or not. I download ADE and EL files from this link http://www.multicharts.com/discussion/v ... php?t=2483
12) Nothing happens when i run the code no errors coming and it is not working. I m not sure why it is not working.
Awaiting
- ABC
- Posts: 721
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 409 times
- Contact:
Re: Code inquire: Pass information from 1st chart to 2nd cha
What do you mean with run the code?
You loaded the sender on a daily chart and it didn't plot anything?
You loaded the sender on a daily chart and it didn't plot anything?
Re: Code inquire: Pass information from 1st chart to 2nd cha
Yes, I created 2 charts and added Sender indicator on one chart and added receiver indicator on second chart.What do you mean with run the code?
You loaded the sender on a daily chart and it didn't plot anything?
And nothing was ploted on Receiver indicator.
- ABC
- Posts: 721
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 409 times
- Contact:
Re: Code inquire: Pass information from 1st chart to 2nd cha
I just checked your code examples and they work fine here. If there is anything wrong with the syncronization, it should raise an error right away. The fact that it doesn't makes it hard to track the problem down.
Do you see the sender plotting?
Do you see the sender plotting?
Re: Code inquire: Pass information from 1st chart to 2nd cha
Ok, I re-make charts and it is working now.
Don't know what was the problem with it.
May be this time i created both charts the same and then re-started my workspace and MC few times and that fixed the missing link some where.
Thanks for the checking Chris.
Don't know what was the problem with it.
May be this time i created both charts the same and then re-started my workspace and MC few times and that fixed the missing link some where.
Thanks for the checking Chris.
Last edited by faraz on 17 Apr 2012, edited 1 time in total.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Code inquire: Pass information from 1st chart to 2nd cha
I say a bit more reading of the manual is in order.I found the problems;
1. MC does not issuing error until i restart the workspace.
2. second thing i noticed that ADE require both charts same symbol and interval other wise data will not be accurately plotted.
3. i attached pic, this time i did not changed the symbol but changed the Daily interval to 2 and the indicator is not matching on 2nd chart.
its look like ADE and ELCollections r not accurately working. What u say?
ADE and ELC have been in service for years, you will find them invaluable additions to your trading arsenal.