Complete Elcollection.dll 64bit with manual and functions file to import.
To work, File must be available at C:\Program Files\TS Support\MultiCharts64
Code: Select all
// Sender code Indicator
Vars: Class("DailyAvg"), AvgMap(MapSN.New), MA(0);
// Put what ever value, Moving average or Rsi etc...
MA = Close;
//Store the data we are interested in into AvgMap
Value1 = MapSN.put(AvgMap,"Close", 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", Yellow);
/////////////////////////////////////////////////////////////////////////////////////////
//second data transfer
Vars: AvgMap2(MapSN.New), MA2(0);
// Put what ever value, Moving average or Rsi etc...
MA2 = High;
//Store the data we are interested in into AvgMap
Value1 = MapSN.put(AvgMap2,"High", MA2);
//Use ADE to store for current symbol and bar interval
Value1 = ADE.putBarinfo(class, GetsymbolName, ADE.Barinterval, ADE.BarID, AvgMap2);
//plot daily average on daily chart
Plot2(MA2, "Av2", Green);
/////////////////////////////////////////////////////////////////////////////////////////
//Third data transfer
Vars: AvgMap3(MapSN.New), MA3(0);
// Put what ever value, Moving average or Rsi etc...
MA3 = Low;
//Store the data we are interested in into AvgMap
Value1 = MapSN.put(AvgMap3,"Low", MA3);
//Use ADE to store for current symbol and bar interval
Value1 = ADE.putBarinfo(class, GetsymbolName, ADE.Barinterval, ADE.BarID, AvgMap3);
//plot daily average on daily chart
Plot3(MA3, "Av3", White);
Code: Select all
//Receiver code Indicator
Input: Interval(1);
vars: Class("DailyAvg"), AvgMap(Mapsn.new), myAvgMap(0);
value1 = Ade.GetBarInfo(Class, GetSymbolName, Interval, Ade.BarID, AvgMap);
myAvgMap = MapSN.Get(AvgMap,"Close");
Plot1(myAvgMap,"DailyAvg",Yellow);
///////////////////////////////////////////////////////////////////////////
//Second Data
vars: AvgMap2(Mapsn.new), myAvgMap2(0);
value1 = Ade.GetBarInfo(Class, GetSymbolName, Interval, Ade.BarID, AvgMap2);
myAvgMap2 = MapSN.Get(AvgMap2,"High");
Plot2(myAvgMap2,"DailyAvg",Green);
///////////////////////////////////////////////////////////////////////////
//Third Data
vars: AvgMap3(Mapsn.new), myAvgMap3(0);
value1 = Ade.GetBarInfo(Class, GetSymbolName, Interval, Ade.BarID, AvgMap3);
myAvgMap3 = MapSN.Get(AvgMap3,"Low");
Plot3(myAvgMap3,"DailyAvg",White);
Another example to check if file exist or not;
Code: Select all
Once ClearPrintLog;
if LastBarOnChart then begin
if ELC.PathExists("D:\qa.txt") then Print("File Exist") Else Print("File NOT Exist");
end;
Another example to read text file last line.
Text file example
"Date","Time","Open","High","Low","Close","Volume",
2024-09-06, 16:29:00, 6505.00, 6509.75, 6501.50, 6507.75, 638
2024-09-06, 16:30:00, 6508.00, 6510.25, 6507.50, 6510.00, 217
2024-09-06, 16:31:00, 6509.75, 6512.00, 6509.50, 6511.25, 201
2024-09-06, 16:32:00, 6511.50, 6512.00, 6511.00, 6511.25, 131
2024-09-06, 16:33:00, 6511.00, 6511.50, 6511.00, 6511.50, 111
Code: Select all
vars: FileName("D:test.txt"), ListC_ID(ListC.New),
ListDate_ID(0), ListTime_ID(0), ListOpen_ID(0), ListHigh_ID(0), ListLow_ID(0), ListClose_ID(0), ListVolume_ID(0),
MyDate(""), MyTime(""), MyOpen(0), MyHigh(0), MyLow(0), MyClose(0), MyVolume(0);
if CurrentBar = 1 then
begin
// Read entire file
Value1 = ListC.ReadFile(ListC_ID, FileName);
// Determine columns to read into list
ListDate_ID = ListC.Get(ListC_ID, 2);
ListTime_ID = ListC.Get(ListC_ID, 3);
ListOpen_ID = ListC.Get(ListC_ID, 4);
ListHigh_ID = ListC.Get(ListC_ID, 5);
ListLow_ID = ListC.Get(ListC_ID, 6);
ListClose_ID = ListC.Get(ListC_ID, 7);
ListVolume_ID = ListC.Get(ListC_ID, 8);
// Read the last record (row) of the file
MyDate = ListS.Get(ListDate_ID, ListS.Count(ListDate_ID));
MyTime = ListS.Get(ListTime_ID, ListS.Count(ListTime_ID));
MyOpen = StrToNum(ListS.Get(ListOpen_ID, ListS.Count(ListOpen_ID)));
MyHigh = StrToNum(ListS.Get(ListHigh_ID, ListS.Count(ListHigh_ID)));
MyLow = StrToNum(ListS.Get(ListLow_ID, ListS.Count(ListLow_ID)));
MyClose = StrToNum(ListS.Get(ListClose_ID, ListS.Count(ListClose_ID)));
MyVolume = StrToNum(ListS.Get(ListVolume_ID, ListS.Count(ListVolume_ID)));
// Check Output
Print("Rows: ", ListS.Count(ListDate_ID):0:0);
Print("Date: ", MyDate);
Print("Time: ", MyTime);
Print("Open: ", MyOpen:0:2);
Print("High: ", MyHigh:0:2);
Print("Low: ", MyLow:0:2);
Print("Close: ", MyClose:0:2);
Print("Volume: ", MyVolume:0:0);
Print("");
// Clean the List from memory
ListC.Clear(ListC_ID);
end;
Trading Excellence ! ! !
1stChoiceStrategy.com