Multitime Frame AutoTrading

Questions about MultiCharts .NET and user contributed studies.
isaacyip
Posts: 3
Joined: 20 Jul 2016
Has thanked: 1 time

Multitime Frame AutoTrading

Postby isaacyip » 20 Jul 2016

Hi,

Many thanks for any possible solution or workaround.

My case is, I need to auto trade on 20 sec chart, but have input from the 2 instruments' 1 min chart.

As I understand, possible solution as follow:
1. GV
2. Bar2, Bar3
3. DataLoader
4. CustomInstrument

I have successful program all in standalone.

As autotrade and backtest purpose, GV is not the choice.

But 2,3,4 have following problem
2, Chart base one Bar2 and Bar3 will only update as Bar2 and Bar3 both have new data. Other wise, the chart will hold even one of them already have new data arrive.

3. Memory Lead. I have load a data loader on future and stock, but the PC keep asking more memory, until 4GB, then my PC crash.

4. Actually same as 3.

Is any suggestion?

Many thx!

BR,
Isaac

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Multitime Frame AutoTrading

Postby Henry MultiСharts » 21 Jul 2016

Hello Isaac,

Please make sure the Realtime-History Matching option is configured correctly:
https://www.multicharts.com/trading-sof ... y_Matching

As for the DataLoader/CustomInstrument - you can load only the data required for the current calculation instead of loading all data in one go.

isaacyip
Posts: 3
Joined: 20 Jul 2016
Has thanked: 1 time

Re: Multitime Frame AutoTrading

Postby isaacyip » 01 Feb 2017

Hello Isaac,

Please make sure the Realtime-History Matching option is configured correctly:
https://www.multicharts.com/trading-sof ... y_Matching

As for the DataLoader/CustomInstrument - you can load only the data required for the current calculation instead of loading all data in one go.
Many thanks for the answers.

Can help provide an example on CustomInstrument how to setup the range of Data be loaded?

thanks again!

Isaac

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Multitime Frame AutoTrading

Postby Henry MultiСharts » 07 Feb 2017

Hello Isaac,

Please make sure the Realtime-History Matching option is configured correctly:
https://www.multicharts.com/trading-sof ... y_Matching

As for the DataLoader/CustomInstrument - you can load only the data required for the current calculation instead of loading all data in one go.
Many thanks for the answers.

Can help provide an example on CustomInstrument how to setup the range of Data be loaded?

thanks again!

Isaac
Hello Isaac,

CustomInstrument loads the data for the entire chart data range, there is no way to load only a specific interval with it, we apologize for confusion.
You can load specific interval using the DataLoader:
viewtopic.php?f=19&t=45848#p100794

isaacyip
Posts: 3
Joined: 20 Jul 2016
Has thanked: 1 time

Re: Multitime Frame AutoTrading

Postby isaacyip » 08 Feb 2017

Hello Isaac,

Please make sure the Realtime-History Matching option is configured correctly:
https://www.multicharts.com/trading-sof ... y_Matching

As for the DataLoader/CustomInstrument - you can load only the data required for the current calculation instead of loading all data in one go.
Many thanks for the answers.

Can help provide an example on CustomInstrument how to setup the range of Data be loaded?

thanks again!

Isaac
Hello Isaac,

CustomInstrument loads the data for the entire chart data range, there is no way to load only a specific interval with it, we apologize for confusion.
You can load specific interval using the DataLoader:
viewtopic.php?f=19&t=45848#p100794
Thanks Henry, but that is also the way I am using but face the problem.

I provide some code let you for comment the problem

--------------------------------------------------------------------------------------
[Work Code]
protected override void StartCalc()
{
Sym = new MTPA_MCSymbolInfo2();
Sym.SymbolCategory = MTPA_MCSymbolCategories.eMTPA_MCSC_STOCK;
Sym.SymbolName = "0700-HKG";
Sym.SymbolExchange = "HKG";
Sym.SymbolCurrency= MTPA_MCSymbolCurrency.eMTPA_MCSC_HKD;
Sym.BigPointValue = 1;
m_MyCustomInstrument = new CustomInstrument(Bars, "eSignal", Sym, new Resolution { Size = 5, Type = EResolution.Minute }, true);

//m_averagefc1.price = m_MyCustomInstrument.Close;
//m_averagefc1.length = 20;
}


--------------------------------------------------------------------------------------
[Not work code]

protected override void StartCalc()
{
Sym = new MTPA_MCSymbolInfo2();
Sym.SymbolCategory = MTPA_MCSymbolCategories.eMTPA_MCSC_STOCK;
Sym.SymbolName = "0700-HKG";
Sym.SymbolExchange = "HKG";
Sym.SymbolCurrency= MTPA_MCSymbolCurrency.eMTPA_MCSC_HKD;
Sym.BigPointValue = 1;
m_MyCustomInstrument = new CustomInstrument(Bars, "eSignal", Sym, new Resolution { Size = 5, Type = EResolution.Minute }, true);

m_averagefc1.price = m_MyCustomInstrument.Close;
m_averagefc1.length = 20;
}
--------------------------------------------------------------------------------------

The only different is I using the function with CustomInstrument's list as input
m_averagefc1.price = m_MyCustomInstrument.Close;
m_averagefc1.length = 20;

I load this in a 1 mins chart. If I load without function calculation, all are perfect, MyCustomInstrument list is collect, but if I apply any function with list as input, the MC.net keep acquire memory until PC crash. Is anyway for fix it or any workaround?

Thanks again.

Isaac

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Multitime Frame AutoTrading

Postby Henry MultiСharts » 08 Feb 2017

Isaac,

Please send me the workspace and export of complete study (with required functions) you are using for replicating this behavior to support @ multicharts.com


Return to “MultiCharts .NET”