Another Database program that uses GVs to communicate with MC

Questions about MultiCharts and user contributed studies.
bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Another Database program that uses GVs to communicate with MC

Postby bowlesj3 » 15 Mar 2020

Hi, I am using MS-Access 64 bit 2016 to help with discretionary trading with MC 64 bit for stock trading. I use global variables to pass information between the two programs. Micrsoft seems to think MS-Access needs some sort of updates even though MS-Access is working fine for me. Three times in a row these updates have aborted such that I can not run access at all. I turned off the update through MS-access but Microsft ignores this and forces the update attempt regardless. The first abort took 6 hours to resolve with supports assistance (reinstall the latest version). The second update took 1 hour with supports assistance (a repair run). I am about to call support for this 3rd update which aborted.

So this leads to a question. Does anyone know of another database program that can replace MS-Access 64 bit which of course can also use GVs to communicate with MultiCharts?

Thanks,
John

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Another Database program that uses GVs to communicate with MC

Postby arjfca » 24 Mar 2020

Hell John

I'm using CSV string to exchange data between MC and Excel. If I recall (I coded that 5 years ago) Data copied from a chart using a keyboard key's combinaison. A text string is created and saved in a text file at a given location. A macro on Excel sheet do read back the text file and place the given values at their respective place.

My data are transfer manually, a click on the chart, the a click on my Excel sheet and data is placed. It could probably be done in an automatic if an exchange protocol is created. Could be like that. Fist digit a the string is "data available

String to look like :
no,H,L,O,C,Indicator1,indicator2,indicator3 Data not available
yes,H,L,O,C,Indicator1,indicator2,indicator3 Data available

MC and Excel or Access could read text file.

Wish you all to be safe during this difficult virus event.

Martin

Note_1 : Also, you could "Rent" Microsoft Office for 11$/month. You will always get the latest update

Note:_2: Some extract of my code in VBA and MC

I did post my code for my CSV string tool on MC forum. Look for SplitString
Variable=SplitString(astring,3) Will return the 3' value on a CSV string


MC code to save data on a text file and the clipboard

Code: Select all

StringInfo = Barinfo_Str + comma + GetSymbolName + comma + scale + comma + vClickPrice_S + comma + DateTimeToString(vclickdatetime); fileappend("G:\BarInfo.txt",StringInfo); clipboard.settext(StringInfo);
One of the Excel macro to copy captured data in the appropriate Excel Sheet

Code: Select all

Sub PutLongMKTtEntry() Dim Astr As String InstallingBarAllowed_ = "Faux" Astr = BarStringInfo 'IInstrument_ = ClikedMarketLong_ IInstrument_ = SplitString(ClikedMarketLong_, 1) Market_In_Use_ = IInstrument_ LongScale_ = SplitString(Astr, 5) UidContract_ = UidContract_ID(IInstrument_.Value) ChartEntry_ = True ' Install Long limit Entry in the Table BlockNewBarData = True Stop_Type_ = "STP LMT" GV_Value = GV_SetInteger(1, 1) 'Sheets("Formulaire").Shapes("Rectangle 70").TextFrame.Characters.Text = _ ' "Stop type:" & Vba.Chr(10) & Vba.Chr(10) & Vba.Chr(10) & Stop_Type_ If LongLimitEntry_ <> 0 And LongLimitStop_ <> 0 Then If LongLimitEntry_ > LongLimitStop_ Then LongStop_ = LongLimitStop_ EntryLong_ = LongLimitEntry_ End If End If Iscale_ = SplitString(MarketAndScale_Long_, 2) If PipLongValue_ < 0 Then PipLongValue_.Font.ColorIndex = 20 'remplir la forme en rouge If PipLongValue_ > 0 Then PipLongValue_.Font.ColorIndex = 1 'remplir la forme en rouge ManualOrder = True LimitProfitLongGain_ = 2 End Sub Sub InstallShortStoPrice() ShortStop_ = ShortLimitStop_ End Sub Sub InstallLongStoPrice() Dim Astr As String Astr = BarStringInfo IInstrument_ = ClickedMarketShort_ ShortScale_ = SplitString(Astr, 5) UidContract_ = UidContract_ID(IInstrument_.Value) ShortStop_ = ShortLimitStop_ End Sub

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Re: Another Database program that uses GVs to communicate with MC

Postby bowlesj3 » 24 Mar 2020

Hi Martin, I may have solved this issue with Office Update messing up access. Here is the latest info.

The problem occurs when I double click an Icon to call access. Never any other time. The issue is not in access itself. It is created by Office Update and it is an error in the call to run access. It appears Office update is getting confused (maybe because I have access only rather than the whole office suite of excel, word & access) and office update is messing up the call to Access causing the call itself to fail (not access).

So I went on an access forum and someone who is very advance suggested I change the icon pointer target
from
"C:\Access\MyMarketWaves.accdb"
to
"C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE C:\Access\MyMarketWaves.accdb"

I have not tried this yet. I eventually will put in this suggestion. In the mean time I want to try my solution which is designed to hopefully cause office update to never run at all.

The solution is to not start the modem until access is already running. This way office update has no way of knowing I have just called access to run. I can do this because I shut off the modem every night. The access database I double click on to get access to run will be my date time stamp backup database which almost never changes so it can sit there keeping access running all day. The idea here is that office update will not run if access is already running. My Market trading related database typically goes down and up 2 or 3 times a day as I am constantly making it better. So I need that backup database a few times a day anyway. If it does not work I could delay my database fixes until after hours and run the market trading related database all day. This would for sure stop office update from running. Anyway, once I find out which of my two solutions work to prevent office update from running I may try not using them for a while and revert to the other solution above to see if Office update will actually run and put in a fix to access (sometimes access locks up). I would do this off hours so i do not get interrupted during trading.


Return to “MultiCharts”