Dynamic Print

Questions about MultiCharts and user contributed studies.
tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Dynamic Print

Postby tradingest » 20 May 2016

Hi all,

how I make to view the dynamic print od variables changing during the execution strategy?

Image

Thanks,
tradingest
Attachments
Immagine 020.png
(17.06 KiB) Downloaded 903 times

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Dynamic Print

Postby JoshM » 21 May 2016

how I make to view the dynamic print od variables changing during the execution strategy?
I'm not sure what you mean here. Without the image, I would say that viewing the values of variables is done with Print(), but you're already using that keyword in your image.

Do you mean: 'how can I see the value of a dynamic variable in another way than using `Print()`?' If that's what you mean, you can use Plot() to have an indicator plot those values on the chart.

gilko
Posts: 16
Joined: 19 Dec 2013
Has thanked: 5 times
Been thanked: 3 times

Re: Dynamic Print

Postby gilko » 23 May 2016

For me, the best way to see all yours datas without print and log message it's Sharevar tools.

https://fx1.net/sharedvar.php

Your store your data (like globalvars) but you have a server windows to see in real time updated datas ;)

Image

tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Re: Dynamic Print

Postby tradingest » 23 May 2016

How it works?

User avatar
Smoky
Posts: 517
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 99 times
Been thanked: 121 times

Re: Dynamic Print

Postby Smoky » 23 May 2016

Very simple ;)

download this free tool, link previous post, install it.

put this code in your indicator/study...

Code: Select all

// TAKE CARE ABOUT .dll name !
// sharevar HOW TO SELECT dll NAME
{

You see 4 different .dll files:

SharedVar-a32.dll : ANSI 32bit DLL
SharedVar-a64.dll : ANSI 64bit DLL
SharedVar-w32.dll : UNICODE 32bit DLL
SharedVar-w64.dll : UNICODE 64bit DLL

depending on your trading platform you have to access right dll. If you have installed SharedVar-setup.exe package
then you will find same dll files also in your Windows Folder. They are identical, just pre-installed.

If you have TS you should use ANSI 32bit.
If you have MT Build 600+ you should use UNICODE 32bit
If you have MT Build <600 you should use ANSI 32bit
If you have MultiCharts 64bit, you should use ANSI 64bit ======= > SharedVar-a64.dll
If you have MultiCharts 32bit, you should use ANSI 32bit
If you have NT 32bit, you should use ANSI 32bit
If you have NT 64bit, you should use ANSI 64bit
etc...

You have to know

a) if your platform is 32 or 64bit
b) what strings your platform accepts, ansi or unicode

SharedVar can be used with every trading platform or every language. Even MathLab like Applications they can call external DLLs can use SharedVar.

Support for professional clients at support@fx1.net

}
/////////////////////////
// INIT DLL SETUP
////////////////////////

external: "SharedVar-a64.dll", int, "svInit",string;
external: "SharedVar-a64.dll", bool, "svSetValue",int,string,double;
external: "SharedVar-a64.dll", bool, "svSetString",int,string,string;
external: "SharedVar-a64.dll", bool, "svGetBool",int,string;
external: "SharedVar-a64.dll", double, "svGetDouble",int,string;
external: "SharedVar-a64.dll", int, "svGetInt",int,string;
external: "SharedVar-a64.dll", string, "svGetString",int,string;
external: "SharedVar-a64.dll", bool, "svSetBool" ,int,string,bool;
////////////////////////////////////////////////////////////////////////////////////

var: intrabarpersist SVhdl(0), intrabarpersist GH(0), intrabarpersist HD(0), retB(false);

SVhdl=svInit("GBPUSD"); // init folder name

// Save VAR HD (write)
retb = svSetValue(SVhdl,"HD",HD); // you'll see now HD update in servershare window


// read data GH
GH = svGetInt(SVhdl,"GH");
enjoy :-)


Return to “MultiCharts”