Search found 17 matches

by christephan
16 May 2016
Forum: MultiCharts .NET
Topic: Detect data connection lost and send email alert.
Replies: 1
Views: 2453

Detect data connection lost and send email alert.

Hi, Sad that today my IB connection lost suddenly and misses opportunity. To prevent similar accident to happen again, I search on the web and find this: https://www.tradingcode.net/multicharts-net/price-data/monitor-real-time-market-data-issue/ Looks good, but it uses DataTime.Now which returns loc...
by christephan
09 Dec 2015
Forum: MultiCharts .NET
Topic: Are there good ways to detect first bar of a session?
Replies: 3
Views: 4436

Re: Are there good ways to detect first bar of a session?

Henry, I haven't tried to port my strategies onto MC9.1. In MC9.0, this code fails to get correct session begin: public sealed class FirstBarInSession : FunctionSimple<System.Boolean> { public FirstBarInSession(CStudyControl _master) : base(_master) { } public FirstBarInSession(CStudyControl _master...
by christephan
15 Sep 2015
Forum: MultiCharts .NET
Topic: Are there good ways to detect first bar of a session?
Replies: 3
Views: 4436

Are there good ways to detect first bar of a session?

Currently, I'm using Bars.LastBarInSession For back testing it's fine. But when I put it into live stream, my signal doesn't trigger LastBarInSession on yesterday close of a SGX symbol. I don't know why. And I must manually stop and restart the strategy every day to make it work properly. One scenar...
by christephan
15 Sep 2015
Forum: MultiCharts .NET
Topic: How Can I Code This?
Replies: 8
Views: 4044

Re: How Can I Code This?

There is a pre-built function called "XAverage". I think that's the EMA. You could have a look.
by christephan
15 Sep 2015
Forum: MultiCharts .NET
Topic: Return multiple VariableSeries from function [SOLVED]
Replies: 4
Views: 3066

Re: Return multiple VariableSeries from function [SOLVED]

I remember FunctionSeries only support native type such as int/double/bool. not sure. Your myVolumeUp/Down are public. So you could refer to them after you instantiate your SomeVolumeCalculations class. For example, public class someClass : SignalObject { .......... SomeVolumeCalculations myVolume; ...
by christephan
10 Feb 2015
Forum: MultiCharts .NET
Topic: Bollinger Band Parameter should be doubles [SOLVED]
Replies: 2
Views: 2005

Re: Bollinger Band Parameter should be doubles [SOLVED]

I think MC should fix this.

But I fixed this by myself.

Open the Bollinger_Bands indicator, change it to "double". It should work.

Code: Select all

[Input]
public double numdevsup { get; set; }

[Input]
public double numdevsdn { get; set; }
by christephan
06 Feb 2015
Forum: MultiCharts .NET
Topic: Close partial postions [SOLVED]
Replies: 10
Views: 6928

Re: Close partial postions [SOLVED]

Hi, Partial exit doesn't work as expected. Am I missing something? Here is code: using System; using System.Drawing; using System.Linq; using PowerLanguage.Function; using ATCenterProxy.interop; namespace PowerLanguage.Strategy { public class Test2 : SignalObject { public Test2(object _ctx):base(_ct...
by christephan
05 Feb 2015
Forum: MultiCharts .NET
Topic: Portfolio backtesting market position from other strategies
Replies: 3
Views: 1860

Re: Portfolio backtesting market position from other strateg

Hello christephan,

You can use global variables or IPortfolioStrategy.PortfolioData (added in MC NET 9.0) for that.
Hi Henry,

Any documentation on IPortfolioStrategy? Google search got nothing~
by christephan
03 Feb 2015
Forum: MultiCharts .NET
Topic: Portfolio backtesting market position from other strategies
Replies: 3
Views: 1860

Portfolio backtesting market position from other strategies

Is is possible to get position on the same symbol from other strategies in portfolio backtesting? I think MarketPositionFromBroker should work on real-time (Not tested). But does not work in backtesting. I have multiple strategies (e.g. S1, S2, and S3) running on the same symbol in portfolio traders...
by christephan
09 Jan 2015
Forum: MultiCharts .NET
Topic: Indicator on Indicator for .NET
Replies: 2
Views: 1548

Indicator on Indicator for .NET

https://www.multicharts.com/trading-software/index.php/Study_on_study The above page said it is not supported in NET. Any plan to support it in future? This is quite an important feature that I have a lot of indicators needed to be horizontally/vertically shift, to add ma/xma/... to it, to do + - x ...
by christephan
24 Dec 2014
Forum: MultiCharts .NET
Topic: Detect positions liquidated by broker
Replies: 3
Views: 1739

Re: Detect positions liquidated by broker

Henry~ I know MarketPositionAtBroker. But it's expected to be different with strategy position when multiple strategies are running on the same symbol. I have two ideas for now~ One is to create a global object to hold the current "MC position". To update the position whenever my strategies are trad...
by christephan
24 Dec 2014
Forum: MultiCharts .NET
Topic: Detect positions liquidated by broker
Replies: 3
Views: 1739

Detect positions liquidated by broker

I have several strategies (each on its charts) running on the same symbol. And if many strategies have positions, sometimes margin is not enough. In simple, if I can have 2 lots for intraday and 1 lot for overnight. And 2 strategies are running separately, each could Buy at most 1 lot. For open posi...
by christephan
23 Dec 2014
Forum: MultiCharts .NET
Topic: Close partial postions [SOLVED]
Replies: 10
Views: 6928

Re: Close partial postions [SOLVED]

Thanks Henry, What does this means exactly? [ExitFromOneEntryOnce(ExitFromOneEntryOnce.FillAndKillExitOrder)] Looks it's still not possible to choose which position to close. That is, if I Buy 3 orders first, Buy.Send ("A"); Buy.Send ("B"); Buy.Send ("C"); And then I want to close "B". Looks it's no...
by christephan
21 Dec 2014
Forum: MultiCharts .NET
Topic: Close partial postions [SOLVED]
Replies: 10
Views: 6928

Re: Close partial postions [SOLVED]

Thanks Josh~ Will try it out~ Looks it should be specified in Create()? Is it possible to specify which position to close at run-time, in CalcBar()? I have a lot of signals generating Buy and SellShort orders. And have another monitor signal to determine when to sell (or cover) a position. Where thi...
by christephan
20 Dec 2014
Forum: MultiCharts .NET
Topic: Close partial postions [SOLVED]
Replies: 10
Views: 6928

Close partial postions [SOLVED]

I meet some problems to close part of my position. Sell order always sell all of my Long position. Looks using Contracts.UserSpecified in Create() doesn't help~ For example, BuyOrder1.Send ("Buy1", 1); //at time 1 BuyOrder2.Send ("Buy2", 1); //at time 2 SellOrder1.Send ("Sell1", 1); //at time 3 - Wi...
by christephan
08 Dec 2014
Forum: MultiCharts .NET
Topic: How to Link Scaling of Multiple Indicators on a Subchart
Replies: 3
Views: 1502

Re: How to Link Scaling of Multiple Indicators on a Subchart

Hi Henry, If using "same as instrument", both oscillators are invisible. (Because price value is large and oscillators values are very small) Reproduce step is easy. As described in the issue tracking system: "Place two of the same screen scaled oscillators on a subchart with each having a different...
by christephan
04 Dec 2014
Forum: MultiCharts .NET
Topic: How to Link Scaling of Multiple Indicators on a Subchart
Replies: 3
Views: 1502

How to Link Scaling of Multiple Indicators on a Subchart

https://www.multicharts.com/pm/viewissu ... ch_queue=1

In this page, it says the feature is released with MC 9.0

But I can't make it work. Anyone knows how to use it?

Go to advanced search