Search found 166 matches

by fbertram
06 May 2019
Forum: MultiCharts .NET
Topic: Tying Order ID to Open Positions when Scaling In/Out of Trades
Replies: 3
Views: 3981

Re: Tying Order ID to Open Positions when Scaling In/Out of Trades

It seems easier to me to manually save some info about the number of shares per position while placing the opening orders.

Cheers!
by fbertram
29 Apr 2019
Forum: MultiCharts .NET
Topic: Big Backtest Memory Problems
Replies: 3
Views: 1651

Re: Big Backtest Memory Problems

Hi Rien, please provide a little more detail about the time resolution you are using. In the absence of that information, I can only guess. But let's do the math here real quick: * assume end-of-day bars * 3,000 instruments x 1 bar / day = 3,000 bars / day * 252 days / year x 3,000 bars / day = 756,...
by fbertram
03 Dec 2018
Forum: MultiCharts
Topic: Help Required With Portfolio Trader
Replies: 2
Views: 1518

Re: Help Required With Portfolio Trader

Hi TealTrader88, I usually code on the .net version of MultiCharts, but let me try to help you with your questions anyways. 1) It seems that the model with Portfolio Trader is that the signals now just generate the buy and sell triggers and the Portfolio Money Management Signal dictates the sizing. ...
by fbertram
29 Nov 2018
Forum: MultiCharts
Topic: Portfolio Trader - passing values between strategies with pmm_set/get_my_named_num
Replies: 1
Views: 899

Re: Portfolio Trader - passing values between strategies with pmm_set/get_my_named_num

When using pmm_set_my_named_num, this won't work, because the money-management signal is executed *after* the trading strategy. Therefore, your 2nd trading strategy will see the value with a 1 bar lag. You could use the global variables dll, or something similar, you could even write the value to a ...
by fbertram
30 Oct 2018
Forum: MultiCharts .NET
Topic: Transfer multiple values from VariableSeries object to C# array [SOLVED]
Replies: 2
Views: 1572

Re: Transfer multiple values from VariableSeries object to C# array [SOLVED]

You can use Linq to do what you need. Try something along the lines of this:

Code: Select all

double[] myArray = Enumerable.Range(0, 25)
.Select(t => Bars.Close[t])
.ToArray();

Hope this helps,
cheers

Felix
by fbertram
14 May 2018
Forum: MultiCharts .NET
Topic: Using MC.net As A Data Server
Replies: 6
Views: 3254

Re: Using MC.net As A Data Server

Hi Gann_Man, I looked at the information you have provided. Unfortunately, this won't be a slam dunk. While the code looks very straightforward, the magic happens in the DLL that Ensign has provided as part of the package. This DLL links back to NT.Core, and cannot be used standalone. Unless Ensign ...
by fbertram
04 May 2018
Forum: User Contributed Studies
Topic: Function to provide S&P500 index
Replies: 2
Views: 2448

Re: Function to provide S&P500 index

Hi Darob, that shouldn't be hard to do. There are a few things that would need to be changed: * the timeframe should be taken from the 'master' instrument * the key used to cache the benchmark data should be changed to the epoch of the bar Sounds like a great activity for a rainy afternoon. PM me, i...
by fbertram
12 Apr 2018
Forum: MultiCharts
Topic: sort array bidimensional
Replies: 1
Views: 931

Re: sort array bidimensional

how about using Sort2DArray? You can find an example here:
https://www.multicharts.com/trading-sof ... y_Examples


Cheers, Felix
by fbertram
12 Apr 2018
Forum: User Contributed Studies
Topic: Function to provide S&P500 index
Replies: 2
Views: 2448

Function to provide S&P500 index

this is a little function that I use to have access to the S&P500 index from my strategies - without the need to add a secondary data series. It uses MultiCharts' DataLoader to load the data into memory. I find this quite useful with Portfolio Trader, and I hope you do too. Best regards, Felix //===...
by fbertram
11 Apr 2018
Forum: MultiCharts
Topic: Is it possible to group inputs in a Portfolio Optimization [SOLVED]
Replies: 2
Views: 1233

Re: Is it possible to group inputs in a Portfolio Optimization [SOLVED]

you could actually move the input to the money-management signal. From there, you could share it with the individual signals using pmm_set_global_named_num. Also, I find the thought of optimizing through 10^11 iterations mildly scary. I am typically trying to keep things between 100 and 1000. Is the...
by fbertram
28 Mar 2018
Forum: MultiCharts
Topic: Backup multichart and missing folder in powerlanguage
Replies: 7
Views: 2228

Re: Backup multichart and missing folder in powerlanguage

Hi Turbofib,

I am not sure I understand your question correctly. When you create a folder in the PowerLanguage editor, in order to help organize your studies, this will actually not create a folder on your hard drive. On the disk, all your studies will remain in the same folder.

Cheers, Felix
by fbertram
22 Mar 2018
Forum: MultiCharts
Topic: Portfolio Trader - Does not advance date to the current date
Replies: 17
Views: 4526

Re: Portfolio Trader - Does not advance date to the current date

Hi Alex, I recommend you contact support directly. From my own experience over the past 18 months, I can tell you that since I switched to restarting my server every morning (instead of letting it run 24/7), everything is running rock solid. I do _not_ need to adjust the end date in portfolio trader...
by fbertram
16 Mar 2018
Forum: MultiCharts
Topic: Portfolio Trader - Does not advance date to the current date
Replies: 17
Views: 4526

Re: Portfolio Trader - Does not advance date to the current date

the little thing that looks like a thumb tack.
PortfolioTrader_Pin.JPG
(26.37 KiB) Downloaded 1188 times
Cheers, Felix
by fbertram
10 Mar 2018
Forum: MultiCharts
Topic: Not possible to import multiple ticker quotes - any alternative ?
Replies: 4
Views: 1409

Re: Not possible to import multiple ticker quotes - any alternative ?

The daily quotes will be *added* to the database. Please note that this might also lead to issues: after splits or dividends, past quotes need to be adjusted... something that won't happen automatically. Once in a while it might be good to delete the data in the database and download historical quot...
by fbertram
09 Mar 2018
Forum: MultiCharts
Topic: Not possible to import multiple ticker quotes - any alternative ?
Replies: 4
Views: 1409

Re: Not possible to import multiple ticker quotes - any alternative ?

Unfortunately yes. I suggest you write a little script to do so.

Cheers, Felix
by fbertram
08 Mar 2018
Forum: MultiCharts
Topic: [Portfolio] Can someone please explain these default default MC MM signals?
Replies: 3
Views: 1732

Re: Can someone please explain these default default MC MM signals?

What is "RankStrategyR" supposed to be? Is it a declared variable within a signal under the strategy found at index "idx" (the first parameter in the pmms_get_strategy_named_num function)? For my purposes, if I want Multicharts to rank the priority of all of my orders according to a variable "value...
by fbertram
08 Mar 2018
Forum: MultiCharts
Topic: Portfolio Trader - Does not advance date to the current date
Replies: 17
Views: 4526

Re: Portfolio Trader - Does not advance date to the current date

I have automated my server: * a schedule set in the BIOS starts the machine in the morning * a script is triggered on Windows startup. This script launches IB TWS and Portfolio Trader, logs in, starts auto-trading. I have programmed this in AutoIT * a script is triggered using Task Scheduler after c...
by fbertram
27 Feb 2018
Forum: MultiCharts
Topic: Anomaly of interpreter [SOLVED]
Replies: 21
Views: 5038

Re: Anomaly of interpreter [SOLVED]

Hi Smarty,

I am actually spending 100% of my time on MultiCharts .NET. You are correct that this does not happen with the .NET version. However, when you call time series functions from conditional blocks, your time series will most likely be corrupted. Pick your poison...

Cheers, Felix
by fbertram
27 Feb 2018
Forum: MultiCharts
Topic: Quarterly Open, High, Low, Close [SOLVED]
Replies: 6
Views: 2419

Re: Quarterly Open, High, Low, Close [SOLVED]

Hi MJ, so looking at your chart it seems that you'd like a function to return the open/high/low/close of the *previous* quarter. That's easy to do, just change the code to this: vars: monthSeries, quarterlyHigh, prevQuarterlyHigh; monthSeries = Month(DateTime); if (Floor((monthSeries[0] - 1) / 4) > ...
by fbertram
27 Feb 2018
Forum: MultiCharts
Topic: Anomaly of interpreter [SOLVED]
Replies: 21
Views: 5038

Re: Anomaly of interpreter [SOLVED]

Hi Smarty, before you jump to conclusions and get overly frustrated, take a deep breath, and dive a little deeper into the semantics of time series. PowerLanguage/ EasyLanguage makes these things look so simple and unassuming, but what's happening behind the scenes is actually surprisingly complicat...
by fbertram
26 Feb 2018
Forum: MultiCharts
Topic: Anomaly of interpreter [SOLVED]
Replies: 21
Views: 5038

Re: Anomaly of interpreter [SOLVED]

Hi Smarty, this is pretty much what I said. You said "and those functions can also use previous values" - this implies that these functions are not simple functions, but series functions. Now for a series function, you cannot just call them in a conditional statement, because you would run the risk ...
by fbertram
26 Feb 2018
Forum: MultiCharts
Topic: Anomaly of interpreter [SOLVED]
Replies: 21
Views: 5038

Re: Anomaly of interpreter [SOLVED]

Smarty, Is your function a simple function, or a series function? Keep in mind that for a series, the function has to be called on every bar. Therefore it might not be a good idea to call these functions conditionally. Regardless of what your function is, is there a reason why you cannot call your f...
by fbertram
26 Feb 2018
Forum: MultiCharts
Topic: Quarterly Open, High, Low, Close [SOLVED]
Replies: 6
Views: 2419

Re: Quarterly Open, High, Low, Close [SOLVED]

Hi MJ, while I no longer have a PowerLanguage version of MultiCharts available to me (I converted to .NET) and therefore can't test my response, you will need to code something along the lines of this: vars: monthSeries, quarterlyHigh; monthSeries = Month(DateTime); if (Floor((monthSeries[0] - 1) / ...
by fbertram
22 Feb 2018
Forum: MultiCharts
Topic: Genetic Optimization settings and behaviour in relation to number of cores [SOLVED]
Replies: 28
Views: 11295

Re: Genetic Optimization settings and behaviour in relation to number of cores [SOLVED]

it's 4 'real' cores. Thanks to hyper-threading, it looks like 8 processors to the OS.
by fbertram
16 Feb 2018
Forum: MultiCharts
Topic: count trade in week
Replies: 3
Views: 1182

Re: count trade in week

Hi Shivax, try something along the lines of: if DayOfWeeek(DateTime[0]) < DayOfWeek(DateTime[1])) then begin // a new week has started // memorize the total number of trades end else begin // we are somewhere in the middle of the week // trades this week is total number of trades minus the number at...
by fbertram
14 Feb 2018
Forum: MultiCharts
Topic: Stoploss' cluster
Replies: 4
Views: 1732

Re: Stoploss' cluster

Hi TT, I am a little handicapped giving you an example, as I am actually working with MultiCharts .NET and my memories of PowerLanguage are starting to fade... So please take the following code snippet with a grain of salt and excuse any errors or typos I might have made: vars: numPositions, posIdx;...
by fbertram
13 Feb 2018
Forum: MultiCharts
Topic: Stoploss' cluster
Replies: 4
Views: 1732

Re: Stoploss' cluster

Hi TT, what you probably want to do, is to look through the recent strategy positions, and then - depending on what you find - stop the strategy. Have a look at these keywords: https://www.multicharts.com/trading-software/index.php/Category:Strategy_Position https://www.multicharts.com/trading-softw...
by fbertram
11 Feb 2018
Forum: MultiCharts
Topic: Optimization in Portfolio Trader
Replies: 2
Views: 1126

Re: Optimization in Portfolio Trader

Hi Gaetano, I too have seen incorrect optimization results due to open trades. My personal solution was to close all open positions on the last bar, whenever I am in optimization or backtest (but not in auto-trading). I have run quite large optimizations and have never seen it crash - however I reco...
by fbertram
11 Feb 2018
Forum: MultiCharts
Topic: how to buy the top 10 stocks of the dow [SOLVED]
Replies: 6
Views: 2323

Re: how to buy the top 10 stocks of the dow [SOLVED]

Hi Siscop, here is how this works: 1) your trading signal is evaluated. This signal should: - make the buy and sell decisions. in your example of buying and holding the top 10 stocks of a given universe, all you need to do is buy - calculate an indicator, in your case a measure of the market momentu...
by fbertram
09 Feb 2018
Forum: MultiCharts .NET
Topic: MultiSymbol backtest
Replies: 6
Views: 2937

Re: MultiSymbol backtest

Hi Carlos, no, you are not bothering me... I am happy to help. MultiCharts does not have a feature to programmatically load a symbol list into Quote Manager. I see 2 options how to achieve what you are trying to do: 1) The MultiCharts way: Your Portfolio Trader contains the whole stock universe. You...
by fbertram
08 Feb 2018
Forum: MultiCharts .NET
Topic: MultiSymbol backtest
Replies: 6
Views: 2937

Re: MultiSymbol backtest

Hi Carlos,

while you can load any symbol using the Data Loader, there are many reasons why you shouldn't try to use that to run multiple strategies 'manually'. Use the Portfolio Trader instead. You can load a list of symbols into it...

Cheers, Felix
by fbertram
05 Feb 2018
Forum: MultiCharts .NET
Topic: MultiSymbol backtest
Replies: 6
Views: 2937

Re: MultiSymbol backtest

I suggest you still use Portfolio Trader to do this. There is no way to simply code a loop and run backtest for a basket of instruments. But you can run them in parallel with Portfolio Trader, and then look at the individual reports by symbol.

Cheers, Felix
by fbertram
11 Jan 2018
Forum: MultiCharts .NET
Topic: Programming Language Comparison: EasyLanguage vs. PowerLanguage vs. .NET
Replies: 5
Views: 6845

Re: Programming Language Comparison: EasyLanguage vs. PowerLanguage vs. .NET

Hi FigmentForex, to use MC .NET, you first need to learn C#. There are various resources out there, a good entry point to Microsoft's own documentation is here: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/ Another book I really like is 'C# in a Nutshell'. There are a variety of...
by fbertram
10 Jan 2018
Forum: MultiCharts
Topic: Symbol mapping in portfolio trader [SOLVED]
Replies: 2
Views: 1083

Re: Symbol mapping in portfolio trader [SOLVED]

yes. You will need to set this up through the MultiCharts main application though, just like you would for any other strategy. Go to File/ Broker Profiles/ Symbol Mapping.

Cheers, Felix
by fbertram
17 Dec 2017
Forum: MultiCharts
Topic: Multicharts and R
Replies: 17
Views: 6936

Re: Multicharts and R

C# is a standardized language, and while there is also an evolution of .NET versions, this shouldn't be much of your concern. Therefore, the investment that you are making in writing code for your proprietary secret sauce is probably in good shape. Having said that, as plain vanilla C# does not know...
by fbertram
16 Dec 2017
Forum: MultiCharts
Topic: Multicharts and R
Replies: 17
Views: 6936

Re: Multicharts and R

I don't think there is an easy way to connect R and PowerLanguage. As mentioned above, you would need a customized DLL to do so.

If this is what you need to do, you should probably switch to the .NET variant. I am personally using Rdotnet, and it is working like a charm.


Cheers, Felix
by fbertram
16 Dec 2017
Forum: MultiCharts .NET
Topic: Programming Language Comparison: EasyLanguage vs. PowerLanguage vs. .NET
Replies: 5
Views: 6845

Re: Programming Language Comparison: EasyLanguage vs. PowerLanguage vs. .NET

Hi FigmentForex, it really depends what you want to do, and what your experience with software development is. PowerLanguage is very easy to learn, and requires only very limited amount of prior software knowledge. You can find a lot of indicators and signals, which probably just run on MultiCharts....
by fbertram
18 Oct 2017
Forum: MultiCharts
Topic: PC config at $4000 [SOLVED]
Replies: 4
Views: 1668

Re: PC config at $4000 [SOLVED]

on a related note, you could also run your optimization in the cloud. Google, Amazon, Microsoft all offer machines with 16, 32, or even more cores. Depending on how often you actually need the processing power, that might be a cheaper way of doing it. As an example, Google's n1-standard-16 machine o...
by fbertram
18 Oct 2017
Forum: MultiCharts
Topic: PC config at $4000 [SOLVED]
Replies: 4
Views: 1668

Re: PC config at $4000 [SOLVED]

I am not exactly sure how you are testing 600 symbols; I assume here that you are using Portfolio Trader for that. During backtesting, Portfolio Trader will only use a single core. Therefore, no matter how much money you spend, there won't be huge differences in performance. During optimization howe...
by fbertram
09 Aug 2017
Forum: User Contributed Studies and Indicator Library
Topic: How to control buy & sell from the portfolio signal
Replies: 4
Views: 4129

Re: How to control buy & sell from the portfolio signal

just in case going to .NET is an option at all, here is how this could look: * in your strategy signal: - create a function (1) in your strategy returning indicator values, probably performance, to the portfolio signal - create a function (2) in your strategy to emit orders, with a parameter taking ...
by fbertram
09 Aug 2017
Forum: MultiCharts
Topic: Portfolio Money Management questions
Replies: 10
Views: 3133

Re: Portfolio Money Management questions

you should be able to set a flag using pmm_set_my_named_num, and check that flag from the portfolio signal.
by fbertram
09 Aug 2017
Forum: User Contributed Studies and Indicator Library
Topic: How to control buy & sell from the portfolio signal
Replies: 4
Views: 4129

Re: How to control buy & sell from the portfolio signal

I haven't tried that, and I moved on to MultiCharts .NET where these things can be handled in a slightly more convenient way. Having said that, I would try to add the limit and the stop loss right where the buy 1/ sell 1 orders are created. I am reasonably sure the limit order is going to work, the ...
by fbertram
08 Aug 2017
Forum: MultiCharts .NET
Topic: C# application talking directly Portfolio Trader
Replies: 2
Views: 1659

C# application talking directly Portfolio Trader

I am running a fully automated trading server, which powers up in the morning, launches TWS, launches Portfolio Trader, starts auto trading, and gracefully shuts everything down in the evening. Until now, I have used AutoIT for automation, basically by attempting to find windows, and sending them ke...
by fbertram
08 Aug 2017
Forum: MultiCharts
Topic: Portfolio Money Management questions
Replies: 10
Views: 3133

Re: Portfolio Money Management questions

Specifically, how to set positions sizes by pmm signals (and obviously it needs to be set before the strategy enters a position rather then after it does). that is actually not what's happening. The process is like this: 1) the strategy creates an order 2) the money-management strategy can now adju...
by fbertram
26 Jul 2017
Forum: MultiCharts
Topic: Backtesting net of investment advisor fees
Replies: 4
Views: 1289

Re: Backtesting net of investment advisor fees

Hi Anna, thanks for your response and your suggestion. It seems that I have to write my own code to create custom reports, and not rely on MultiCharts' built-in reports. I am starting to dump the relevant data from my strategy into a CSV, and using Excel and VBA to create the plots and KPIs that I l...
by fbertram
25 Jul 2017
Forum: MultiCharts .NET
Topic: tsServer.exe crashes frequently [SOLVED]
Replies: 4
Views: 2706

Re: tsServer.exe crashes frequently [SOLVED]

there is not enough information here to even guess what the root cause for this crash might be. I am running MultiCharts in live trading daily and it is very stable for me, but then again I have a machine that is only doing that and absolutely nothing else, and that was freshly setup with Windows 10...
by fbertram
24 Jul 2017
Forum: MultiCharts
Topic: Backtesting net of investment advisor fees
Replies: 4
Views: 1289

Backtesting net of investment advisor fees

A client has asked me to show backtesting results net of the investment advisory fee. I am seeing the following potential solutions for this: (1) create a commission scheme that somehow includes the investment advisor fees. I would need 2 components: - about $0.015/share for the broker commission - ...
by fbertram
14 Jul 2017
Forum: MultiCharts
Topic: IB Advisor Account: allocation to individual accounts
Replies: 2
Views: 928

Re: IB Advisor Account: allocation to individual accounts

I have posted a feature request to IB's Feature Poll. If you are facing similar problems as I do, please vote for it:
https://www.interactivebrokers.com/en/?f=2493&sid=12643
by fbertram
13 Jul 2017
Forum: MultiCharts
Topic: IB Advisor Account: allocation to individual accounts
Replies: 2
Views: 928

IB Advisor Account: allocation to individual accounts

I am looking to trade a strategy for multiple clients in an IB advisor account. However, I am confused about the methods IB offers to allocate shares to the individual (client) accounts. Here are the situations I see as problematic: Scenario A: onboarding a new client * account #1: existing client, ...
by fbertram
15 Dec 2016
Forum: MultiCharts .NET
Topic: How to terminate one iteration of optimization early
Replies: 1
Views: 1091

How to terminate one iteration of optimization early

Dear MultiCharts fans, In order to speed up optimization, I would like to end individual iterations early, when certain criteria are met. An example condition would be exceeding a certain draw-down. I am aware of ExecControl.Abort(), but that unfortunately aborts the whole optimization, not just a s...
by fbertram
02 Dec 2016
Forum: MultiCharts .NET
Topic: OnBrokerStategyOrderFilled [SOLVED]
Replies: 5
Views: 2348

Re: OnBrokerStategyOrderFilled [SOLVED]

Hi Kristina, thanks a lot for your code example. Unfortunately, I believe your code will also suppress the message when a new position is intentionally opened. The best I could come up with is this, but I am not sure this will work under all circumstances. It is not clear to me when exactly the 'ini...
by fbertram
01 Dec 2016
Forum: MultiCharts .NET
Topic: OnBrokerStategyOrderFilled [SOLVED]
Replies: 5
Views: 2348

Re: OnBrokerStategyOrderFilled [SOLVED]

Please do not generate alerts on the first call of this event OnBrokerStrategyOrderFilled after you turn on auto-trading and you will not receive an email alert when no order is actually executed. Hi Kristina, thanks a lot for your response. Unfortunately, filtering 'the first call of this event' i...
by fbertram
30 Nov 2016
Forum: MultiCharts .NET
Topic: OnBrokerStategyOrderFilled [SOLVED]
Replies: 5
Views: 2348

OnBrokerStategyOrderFilled [SOLVED]

Dear MultiCharts fans, I am using Portfolio Trader to trade about 200 stocks on daily bars. I am shutting down my trading server every night, and firing it up in the morning before the session opens. Positions stay open for multiple days, and across multiple shutdowns/ restarts of MultiCharts. I am ...
by fbertram
22 Nov 2016
Forum: User Contributed Studies
Topic: Portfolio Trader demo
Replies: 0
Views: 1929

Portfolio Trader demo

Dear MultiCharts fans, attached you'll find a very basic demo project for Portfolio Trader. This project takes a slightly different approach than the 'traditional MultiCharts way': Instead of splitting the logic between the strategy signal and the money-management signal, this project keeps pretty m...
by fbertram
21 Nov 2016
Forum: MultiCharts .NET
Topic: 10.0 RC (Build 135): Loading workspaces broken? [SOLVED]
Replies: 1
Views: 1323

10.0 RC (Build 135): Loading workspaces broken? [SOLVED]

I am using the Multicharts.Net 10.0 Release Candidate, Build 135. I have tried to save a workspace and restore it. Unfortunately, this functionality seems broken: * when I try to load a workspace manually (File/ Open Workspace), a new MultiCharts instance will be created and no workspace is loaded *...
by fbertram
17 Nov 2016
Forum: MultiCharts .NET
Topic: Portfolio Trader command line options
Replies: 4
Views: 2239

Portfolio Trader command line options

Hi MultiCharts fans, I am looking to automate Portfolio Trader on my server. So far I have been using AutoIT to automate the GUI, but I would prefer to have something that is more stable than emulating keyboard input and mouse clicks. Question: are there command line options that allow me to: * load...
by fbertram
14 Nov 2016
Forum: MultiCharts .NET
Topic: Trade manager: how to retrieve Account object [SOLVED]
Replies: 1
Views: 1429

Re: Trade manager: how to retrieve Account object [SOLVED]

ok, found it: var accountEquity = 0.0; if (Environment.IsAutoTradingMode) { TradeManager.ProcessEvents(); foreach(Account account in TradeManager.TradingData.Accounts.Items) accountEquity += account.Equity != null ? (double)account.Equity : 0.0; } I wish the documentation was slightly more detailed...
by fbertram
14 Nov 2016
Forum: MultiCharts .NET
Topic: Trade manager: how to retrieve Account object [SOLVED]
Replies: 1
Views: 1429

Trade manager: how to retrieve Account object [SOLVED]

Dear MultiCharts fans, I am in the process of porting my EasyLanguage code to .NET. Most of this transition was very easy - I'd even go as far as calling it enjoyable. Now I am running into a little problem, and I would appreciate any pointers: How do I retrieve account information? Basically I am l...
by fbertram
14 Oct 2016
Forum: User Contributed Studies and Indicator Library
Topic: How to control buy & sell from the portfolio signal
Replies: 4
Views: 4129

How to control buy & sell from the portfolio signal

The portfolio signal is executed after all the trading strategies have been executed. If you want to emit trades based on portfolio decisions, this leads to a one bar delay - which in turn might force you out of daily bars and into 5 minutes or so. The code I am sharing below overcomes this limitati...
by fbertram
23 Sep 2016
Forum: MultiCharts
Topic: Backtesting with ASCII data painfully slow......
Replies: 21
Views: 7348

Re: Backtesting with ASCII data painfully slow......

Hi Alex, I understand that you will never be able to implement all feature wishes with the limited resources you have, after all you have a business to run. But: there are a few issues with MultiCharts that are largely affecting productivity and workflows, at least for some people. This is one of th...
by fbertram
19 Jul 2016
Forum: MultiCharts
Topic: Portfolio Trader Optimize For Sharpe Across Multiple Strats
Replies: 2
Views: 1367

Re: Portfolio Trader Optimize For Sharpe Across Multiple Str

Hi Trader0311, you would need to put the "Optimize for Sharpe" strategy into the money-management part of Portfolio Trader... which you unfortunately can't. But: you can basically cut & paste the code from there into your money-management signal. You can optimize by any criterion you can think of - ...
by fbertram
19 Jul 2016
Forum: MultiCharts
Topic: Export Detailed Equity Curve Values from Optimization Report
Replies: 2
Views: 1315

Re: Export Detailed Equity Curve Values from Optimization Re

Hi trader0311, afaik, there is no straightforward way to do what you are trying to do, but there are workarounds. Here is what I would do: make sure you have ELCollections installed. create a MapNN like this: variable: ID(MapNN.New); fill the map in your code like this: value1 = MapNN.Put(ID, date, ...
by fbertram
04 Jul 2016
Forum: User Contributed Studies and Indicator Library
Topic: Speeding up backtest & optimization w/ hybrid bar intervals
Replies: 0
Views: 2232

Speeding up backtest & optimization w/ hybrid bar intervals

I am working on a strategy that - for the most part - emits trades once a day. Unfortunately, these trades happen at the beginning of the session, so I can't use daily bars. Instead of simulating with 5 minute bars and taking a huge hit in processing time, I am using a hybrid bar interval, with 3 ba...
by fbertram
02 Jul 2016
Forum: MultiCharts
Topic: Multiple strategies on one chart
Replies: 7
Views: 4433

Re: Multiple strategies on one chart

Hi Zheka, there are ways to do what you are looking for: * change your signals to not directly submit orders, but to set a global variable that holds the number of shares each signal would like to hold * have one additional signal, which nets all the global variables and submits trades to make Curre...
by fbertram
07 May 2016
Forum: MultiCharts
Topic: PowerLanguage Programmers Guide in PDF format [SOLVED]
Replies: 15
Views: 16183

Re: PowerLanguage Programmers Guide in PDF format [SOLVED]

try searching Google for 'EasyLanguage' and 'pdf'... you'll find a ton of guides, tutorials, and references.

Cheers, Felix
by fbertram
05 Apr 2016
Forum: MultiCharts
Topic: Calculating "Portfolio Entries Today"
Replies: 3
Views: 1589

Re: Calculating "Portfolio Entries Today"

Xyzzy, here is what I would do: In the trading signal: variable: PortfolioEntriesToday(0); pmm_set_my_named_num("STRATEGY_ENTRIES", EntriesToday); PortfolioEntriesToday = pmm_get_global_named_num("PORTFOLIO_ENTRIES"); And in the money-management signal: variable: PortfolioEntriesToday(0); PortfolioE...
by fbertram
03 Apr 2016
Forum: MultiCharts
Topic: Calculating "Portfolio Entries Today"
Replies: 3
Views: 1589

Re: Calculating "Portfolio Entries Today"

Your strategies could report to the money-management signal using pmm_set_my_named_num...

Cheers, Felix
by fbertram
03 Apr 2016
Forum: MultiCharts
Topic: Portfolio Strategy on Equity
Replies: 13
Views: 4773

Re: Portfolio Strategy on Equity

al68 I feel your pain... What you need, is an 'observer', which allows you to continue monitoring the trading performance. There are multiple solutions to this: 1) you write a bunch of code, so that your strategy knows what the trades are it would have taken... if the money-management signal had all...
by fbertram
02 Apr 2016
Forum: User Contributed Studies and Indicator Library
Topic: scaling into and out of positions
Replies: 1
Views: 11118

scaling into and out of positions

This example shows a simple strategy that will keep the total investment close to $100k by scaling into and out of positions: variables: DeltaShares (0), SharesFor100k (0); [SameExitFromOneEntryOnce = false] once ClearPrintLog; if date > date[1] then begin print(ELDateToString(date), " ", SymbolName...
by fbertram
02 Apr 2016
Forum: MultiCharts
Topic: Scaling Out of a Position [SOLVED]
Replies: 2
Views: 1624

Re: scaling out of a position [SOLVED]

ok, found it. The magic line is: [SameExitFromOneEntryOnce = false] Without this setting, any given entry cannot have more than one exit associated with it. I posted the working example in the 'user contributed studies library': https://www.multicharts.com/discussion/viewtopic.php?f=5&t=49635 Cheers...
by fbertram
01 Apr 2016
Forum: MultiCharts
Topic: Scaling Out of a Position [SOLVED]
Replies: 2
Views: 1624

Scaling Out of a Position [SOLVED]

I am experimenting with a strategy, that is scaling in and out of a position, instead of opening and closing it completely. This simplified code should scale in and out of a position, and keep the total investment for the strategy close to $100k: variables: DeltaShares (0), SharesFor100k (0); once C...
by fbertram
14 Feb 2016
Forum: MultiCharts
Topic: Dynamic BI-Dimensional Array [SOLVED]
Replies: 10
Views: 3331

Re: Dynamic BI-Dimensional Array [SOLVED]

While Easy Language can't create dynamic 2-dimensional arrays, it is possible to do that by integrating Lua into Multicharts. See this thread:
viewtopic.php?f=1&t=49332

Cheers, Felix
by fbertram
15 Jan 2016
Forum: MultiCharts
Topic: dynamic 2D array
Replies: 1
Views: 2134

Re: dynamic 2D array

Hi Kernel, you can do this using the Lua integration I created. See here: https://www.multicharts.com/discussion/viewtopic.php?f=5&t=49242 The code for creating and using a dynamic 2D array would look like this: //============================================================================== // Desc...
by fbertram
27 Dec 2015
Forum: User Contributed Studies and Indicator Library
Topic: Integrating Lua programming language w/ MultiCharts
Replies: 3
Views: 6188

Re: Integrating Lua programming language w/ MultiCharts

Hi Ben,

I'm glad you like the idea. Allows to do a lot of things you can't do with ElCollections. Let me know how it works for you and how you would like to use it - I might be able to make it happen.

Cheers, Felix
by fbertram
11 Dec 2015
Forum: User Contributed Studies and Indicator Library
Topic: Integrating Lua programming language w/ MultiCharts
Replies: 3
Views: 6188

Integrating Lua programming language w/ MultiCharts

Dear MultiCharts fans, while EasyLanguage is very good for developing trading strategies, it is missing a lot of the functionality typical programming languages have. These include more fancy data types and access to the file system. One way to overcome these issues, is to use ELCollections, which a...
by fbertram
04 Dec 2015
Forum: MultiCharts
Topic: Backtesting with ASCII data painfully slow......
Replies: 21
Views: 7348

Re: Backtesting with ASCII data painfully slow......

OK, so I played around with this some more. I have changed the code from Perl to C++ and I am using multiple threads. The main thread loads the data from disk. We don't want multiple threads here, as the seeks will otherwise probably kill us. Once the data are loaded, they are passed on to a bunch o...
by fbertram
04 Dec 2015
Forum: MultiCharts
Topic: Multicharts on Window server, AWS, EC2
Replies: 35
Views: 14482

Re: Using MultiCharts with Amazon AWS

it is hard to give you advise here as I don't know what you are planning to do. If you are simulating many stocks (let's say 200) over longer periods (let's say 10 years) and higher resolutions (let's say 5 minutes), 8GB won't get you far and you will be running out of RAM. If you are simulating jus...
by fbertram
03 Dec 2015
Forum: MultiCharts
Topic: Backtesting with ASCII data painfully slow......
Replies: 21
Views: 7348

Re: Backtesting with ASCII data painfully slow......

I spent a few minutes to code a little PerlScript that loads ASCII data from disk, parses them and puts them into RAM; see below. This is a brute-force implementation, reading in the ASCII files line by line and from the very beginning. It will look at the year and drop everything before 2005. Then,...
by fbertram
03 Dec 2015
Forum: MultiCharts
Topic: Backtesting with ASCII data painfully slow......
Replies: 21
Views: 7348

Re: Backtesting with ASCII data painfully slow......

... one more data point to back up my claims. The total size of the ASCII data is about 3GB. I can copy these data on the drive in about 35 seconds. During data copy, the operating system will - read the data from disk to memory - write the data from memory back to disk A few thoughts how this relat...
by fbertram
03 Dec 2015
Forum: MultiCharts
Topic: Multicharts on Window server, AWS, EC2
Replies: 35
Views: 14482

Re: Using MultiCharts with Amazon AWS

if I remember correctly, new customers can indeed have one year free service... on the smallest machine they have, which is the t2.micro. That machine comes with a single core (vCPU) and 1 GB of memory. This will not be enough for MultiCharts. I am not sure what you are trying to do, how many instru...
by fbertram
03 Dec 2015
Forum: MultiCharts
Topic: Backtesting with ASCII data painfully slow......
Replies: 21
Views: 7348

Re: Backtesting with ASCII data painfully slow......

Hi TJ, I cringe when people talk fudge like this. I am sure we can all benefit from each other's knowledge and experiences - but that will only happen if we talk to each other on eye level. Thank you. So here is the information you've been wondering about: * the machine I am using is a 16-core Ivy-B...
by fbertram
03 Dec 2015
Forum: MultiCharts
Topic: Multicharts on Window server, AWS, EC2
Replies: 35
Views: 14482

Re: Using MultiCharts with Amazon AWS

I have tried several different cloud services. From the ease-of-use point of view, Microsoft Azure wins hands-down. Unfortunately, they are expensive. I didn't like the user experience of AWS at all. What I ended up using is the Google Compute Engine. I am not using it for live trading, but only for...
by fbertram
03 Dec 2015
Forum: MultiCharts
Topic: Backtesting with ASCII data painfully slow......
Replies: 21
Views: 7348

Re: Backtesting with ASCII data painfully slow......

Hi BlueFightingCat, I am seeing the same issue here. Loading of data is very slow, even though I am only working with about 200 stocks on 5 minute charts. I have imported the data before, but from what I saw, this did *not* speed things up. Also, this becomes a major nuisance when receiving data upd...
by fbertram
26 Nov 2015
Forum: User Contributed Studies and Indicator Library
Topic: TWS + Portfolio Trader: auto-launch & email notifications
Replies: 4
Views: 5485

Re: TWS + Portfolio Trader: auto-launch & email notification

Hi arjfca, the current version of the scripts does not detect TWS restarts. However, as the time is well known, you could easily set it up to shutdown before TWS restart, wait for an hour or two and then restart everything. Does this answer your question? Now that Portfolio Trader also supports emai...
by fbertram
19 Nov 2015
Forum: MultiCharts
Topic: How to run another program from PowerLanguage [SOLVED]
Replies: 3
Views: 3041

Re: How to run another program from PowerLanguage [SOLVED]

This is code I successfully used on a 64 bit system: Input: message(StringSimple); //------------------------------------------------------------------------------ // declare ShellExecuteA DEFINEDLLFUNC: "shell32.dll", int, "ShellExecuteA", lpstr, // HWND LPSTR, // lpOperation, LPSTR, // lpFile, LPS...
by fbertram
30 Oct 2015
Forum: MultiCharts
Topic: R in Powerlanguage [SOLVED]
Replies: 2
Views: 2454

Re: R in Powerlanguage [SOLVED]

Hi Eto, please note that you can do what you are asking for already. Using DefineDLLFunc you can define PowerLanguage functions, which call external DLLs. You can also use this to launch external executables, by linking to function ShellExecuteA in Shell32.dll. In order to integrate results from an ...
by fbertram
06 Aug 2015
Forum: MultiCharts
Topic: Strategy Positions: Backtesting vs. Auto-Trading
Replies: 1
Views: 1056

Strategy Positions: Backtesting vs. Auto-Trading

Dear MultiCharts fans, I am using Portfolio Trader w/ MultiCharts 9.1. I have developed a strategy that uses an "observer signal" to derive some information on the strategy position's trading performance in order to make portfolio decisions. The relevant code looks like this: variables: stats.LastPo...
by fbertram
22 May 2015
Forum: MultiCharts
Topic: CPU Usage During Optimization
Replies: 9
Views: 22690

Re: CPU Usage During Optimization

well, I am not necessarily looking for GPU optimizations, these probably come with their very own set of challenges. All I am asking for is to use multi-cores more efficiently. I very well understand that for single strategies, that is not easy. For Portfolio Trader as well as optimization the situa...
by fbertram
22 May 2015
Forum: MultiCharts
Topic: Oanda Login Procedure Automation
Replies: 1
Views: 2285

Re: Oanda Login Procedure Automation

Hi, I have no idea how the login procedure for Oanda works. But I assume what you need to do is: * launch some application * wait for it to pop up a window * enter login credentials into the appropriate fields If that is the case, you might find some inspiration how to do that here: https://www.mult...
by fbertram
22 May 2015
Forum: MultiCharts
Topic: CPU Usage During Optimization
Replies: 9
Views: 22690

CPU Usage During Optimization

Dear MultiCharts fans, I am in the process of optimizing a strategy with Portfolio Trader. This is a big task, so every little bit of time savings I can make will help. I noticed a few things: * initial loading of the data takes quite some time (I am simulating ~200 stocks, 5 minute charts, 10 years...
by fbertram
08 May 2015
Forum: MultiCharts
Topic: exact calculation of trailing stops
Replies: 1
Views: 1244

exact calculation of trailing stops

Dear MultiCharts fans, I'd like to better understand how exactly MultiCharts calculates the fill price for a stop-loss during backtesting. My current understanding is as follows: * MultiCharts will assume OHLC, when open is closer to high and OLHC when open is closer to low * a trailing stop should ...
by fbertram
08 May 2015
Forum: MultiCharts
Topic: help ! Last Bar Time of a Session needed
Replies: 2
Views: 1474

Re: help ! Last Bar Time of a Session needed

Hi SpTrader, here is a code snippet I use to detect the last bar in a trading session: if CalcTime(Time, BarInterval) > SessionEndTime(1, 1) then Trigger.Last = true else Trigger.Last = false; The last bar will have a time stamp at the session end. Therefore, adding the bar interval to it, will lead...
by fbertram
30 Apr 2015
Forum: MultiCharts
Topic: Portfolio Fixed Size [SOLVED]
Replies: 3
Views: 1690

Re: Portfolio Fixed Size [SOLVED]

as a workaround: can you create a MM signal and call pmms_strategy_set_entry_contracts for all strategies there? Maybe like this: variables: portfolioStrategies(0); once begin portfolioStrategies = pmms_strategies_count(); end; for idx = 1 to portfolioStrategies begin pmms_strategy_set_entry_contrac...
by fbertram
30 Apr 2015
Forum: MultiCharts
Topic: Money Management Code that Won't Bust my Margin
Replies: 1
Views: 1322

Re: Money Management Code that Won't Bust my Margin

Hi there, did you have a look at the documentation? See here: https://www.multicharts.com/trading-software/index.php/Portfolio_Trader https://www.multicharts.com/trading-software/index.php/Portfolio_Trader_Strategy_Examples The examples are actually pretty good. You can figure out your current portf...
by fbertram
09 Mar 2015
Forum: MultiCharts
Topic: Auto-start of trading system
Replies: 4
Views: 2361

Re: Auto-start of trading system

I have shared some code here:
viewtopic.php?f=20&t=48295
by fbertram
09 Mar 2015
Forum: MultiCharts
Topic: PortfolioTrader Email Alerts
Replies: 5
Views: 2185

Re: PortfolioTrader Email Alerts

I have shared some code here:
viewtopic.php?f=20&t=48295
by fbertram
09 Mar 2015
Forum: MultiCharts
Topic: Retrieving currently open orders
Replies: 10
Views: 3292

Re: Retrieving currently open orders

I have shared some code that retrieves the order status based on TWS's audit trails:
viewtopic.php?f=20&t=48295

Cheers, Felix
by fbertram
09 Mar 2015
Forum: User Contributed Studies and Indicator Library
Topic: TWS + Portfolio Trader: auto-launch & email notifications
Replies: 4
Views: 5485

TWS + Portfolio Trader: auto-launch & email notifications

Dear MultiCharts fans, I'd like to share some code with you in the hopes that you might find this useful. The attached Perl scripts implement the following functionality: * wait until 9am EST * launch TWS and Portfolio Trader * start auto-trading * send email notifications for orders placed, orders ...
by fbertram
03 Mar 2015
Forum: MultiCharts
Topic: keep EasyLanguage files in sync between different computers
Replies: 14
Views: 4430

Re: keep EasyLanguage files in sync between different comput

BTW, I am using Atlassian's SourceTree as a client. Good tool, I really like the Git-Flow feature, it's commercially maintained and it's free (requires registration though).

Cheers, Felix
by fbertram
03 Mar 2015
Forum: MultiCharts
Topic: keep EasyLanguage files in sync between different computers
Replies: 14
Views: 4430

Re: keep EasyLanguage files in sync between different comput

Hi FutureTrader,

here is my .gitignore. I have replaced the leading period with an underscore.

Cheers, Felix
by fbertram
26 Feb 2015
Forum: MultiCharts
Topic: keep EasyLanguage files in sync between different computers
Replies: 14
Views: 4430

Re: keep EasyLanguage files in sync between different comput

I have basically the complete MultiCharts folder in ProgramData imported into a git repository. An extensive gitignore makes sure that I only track the important files. I use two machines, one for development and one for trading. I am only using the master branch for trading. Editing on both machine...
by fbertram
18 Feb 2015
Forum: MultiCharts
Topic: Retrieving currently open orders
Replies: 10
Views: 3292

Re: Retrieving currently open orders

Thanks Henry, that's great news! Is there a tentative target date for 9.1 yet?
by fbertram
17 Feb 2015
Forum: MultiCharts
Topic: PortfolioTrader Email Alerts
Replies: 5
Views: 2185

Re: PortfolioTrader Email Alerts

thanks for the hint. I looked at the files and found the information in the audit trail more complete. Parsing XML is easy in Perl.
by fbertram
16 Feb 2015
Forum: MultiCharts
Topic: PortfolioTrader Email Alerts
Replies: 5
Views: 2185

Re: PortfolioTrader Email Alerts

Hi there, I asked pretty much the exact same question a couple of weeks ago: https://www.multicharts.com/discussion/viewtopic.php?f=1&t=47943 I am currently working on some Perl code that looks at the audit.xml files created by TWS and then sends out emails. I will share that code shortly. Cheers, F...
by fbertram
16 Feb 2015
Forum: MultiCharts
Topic: Retrieving currently open orders
Replies: 10
Views: 3292

Re: Retrieving currently open orders

I am looking at the IB API for C#: https://www.interactivebrokers.com/en/software/api/api.htm It seems that reqOpenOrders() would return the information. All requests are asynchronous, but that shouldn't be too much of an issue to overcome. In the .Net edition, one could probably call into the API m...
by fbertram
15 Feb 2015
Forum: MultiCharts
Topic: Retrieving currently open orders
Replies: 10
Views: 3292

Retrieving currently open orders

Dear MultiCharts fans, Is there any way to retrieve the currently open orders from Powerlanguage? This would be a useful feature for Portfolio Trader, where open orders can no longer be determined by the trading signal alone. Also, I would really like to monitor what's at the broker programmatically...
by fbertram
08 Feb 2015
Forum: MultiCharts
Topic: Failed To Save Portfolio Performance Report
Replies: 20
Views: 9042

Re: Failed To Save Portfolio Performance Report

Release 5 does the trick. Thanks Multicharts team!
by fbertram
24 Jan 2015
Forum: MultiCharts
Topic: email/SMS when MC or a strategy gets disconnected
Replies: 5
Views: 2488

Re: email/SMS when MC or a strategy gets disconnected

you would need to create an alert. In the strategy settings, you can specify what happens with that alert, including sending an email or playing a sound. Most cell phone carriers offer you to send text messages as email. Keep in mind that when you lose connectivity due to internet outage, you will p...
by fbertram
24 Jan 2015
Forum: MultiCharts
Topic: Failed To Save Portfolio Performance Report
Replies: 20
Views: 9042

Re: Failed To Save Portfolio Performance Report

Dear MultiCharts fans, I am wondering if I am having the same issue: I am trying to export a Portfolio Report from Portfolio Trader to OpenOffice. Everything seems to run well... and then at the last stage I am seeing an error 'failed to save file' and no export is created. This is really a severe l...
by fbertram
17 Jan 2015
Forum: MultiCharts .NET
Topic: Simple Portfolio Trading Simulation engine
Replies: 6
Views: 2830

Re: Simple Portfolio Trading Simulation engine

Hi Jeff, Did you see the link to the samples at the bottom of the page I pointed you to? Here is some sample code: http://www.multicharts.com/trading-software/index.php/Portfolio_Trader_Strategy_Examples This code is in EasyLanguage (or PowerLanguage). If you are not great at coding that's what I wo...
by fbertram
17 Jan 2015
Forum: MultiCharts .NET
Topic: Simple Portfolio Trading Simulation engine
Replies: 6
Views: 2830

Re: Simple Portfolio Trading Simulation engine

Hi Jeff, While I am not overly familiar with the .Net version of Multicharts, I can tell you that I am successfully doing what you are describing with the EasyLanguage version. Have a look here: http://www.multicharts.com/trading-software/index.php/Portfolio_Trader There are also some examples how t...
by fbertram
16 Jan 2015
Forum: MultiCharts
Topic: IB: trading outside of regular trading hours??? [SOLVED]
Replies: 4
Views: 3208

Re: IB: trading outside of regular trading hours??? [SOLVED]

Hi Orion,

thanks a lot for your reply, that helps!

Dear Multicharts team,
I am not sure I agree 'on' is a great default for this setting...


Cheers, Felix
by fbertram
15 Jan 2015
Forum: MultiCharts
Topic: stop loss not submitted [SOLVED]
Replies: 6
Views: 3332

Re: stop loss not submitted [SOLVED]

Hi Andrew, thanks a lot for your response. The only reason why I didn't use 'recalculate on position change' is because MultiCharts has it disabled by default... I was able to understand a little better what happened. Actually MultiCharts didn't fail to place the stop-loss order. Instead, IB was exe...
by fbertram
15 Jan 2015
Forum: MultiCharts
Topic: IB: trading outside of regular trading hours??? [SOLVED]
Replies: 4
Views: 3208

IB: trading outside of regular trading hours??? [SOLVED]

Dear Multicharts fans, I am seeing an order which was executed at IB outside of the regular trading hours - which is not what I wanted. Here is what Interactive Brokers said: I have reviewed your order and see that it was a Stop Limit Order with a trigger price of xxx and a limit price of yyy. The t...
by fbertram
14 Jan 2015
Forum: MultiCharts
Topic: stop loss not submitted [SOLVED]
Replies: 6
Views: 3332

stop loss not submitted [SOLVED]

Dear MultiCharts fans, today, I was seeing an issue with a stop loss order not submitted to the broker. Here is the string of events: * a stop-order is triggered, surprisingly far away from the market price * because of that, the signal wasn't aware the order filled * this seems to have caused the s...
by fbertram
14 Jan 2015
Forum: MultiCharts
Topic: Portfolio Trader: email alert? [SOLVED]
Replies: 4
Views: 2656

Re: Portfolio Trader: email alert? [SOLVED]

Hi Henry,

thanks a lot for your response. Is there a rough timeline for 9.1?

Thank you,
best regards, Felix
by fbertram
13 Jan 2015
Forum: MultiCharts
Topic: Portfolio Trader: email alert? [SOLVED]
Replies: 4
Views: 2656

Portfolio Trader: email alert? [SOLVED]

Dear Multicharts fans, I am using Portfolio Trader and would like to send email alerts from my signals, preferably the MM signal. Can Portfolio Trader send email alerts at all, or does this feature only exist in the MultiCharts main app? If it exists, how do I enable email alerts? If it doesn't exis...
by fbertram
07 Jan 2015
Forum: MultiCharts
Topic: Autotrading not submitting orders to IB
Replies: 11
Views: 3281

Re: Autotrading not submitting orders to IB

Hi Henry,
thanks a lot for your response. I will try to get you the additional data you requested asap.

Best regards, Felix
by fbertram
05 Jan 2015
Forum: MultiCharts
Topic: MC for Interactive Brokers (automated trading of portfolio)?
Replies: 6
Views: 2489

Re: MC for Interactive Brokers (automated trading of portfol

I don't know. I assume that memory is the main limitation. I am running a little over 180 stocks and see absolutely no issues with that.

Cheers, Felix
by fbertram
05 Jan 2015
Forum: MultiCharts
Topic: Autotrading not submitting orders to IB
Replies: 11
Views: 3281

Re: Autotrading not submitting orders to IB

Hi Henry, thank you for your follow-up. I am sorry if I wasn't clear enough. On initial connect, everything is fine. The problem only occurs, after something happened to the connection, e.g. downtime at IB. After an outage, MultiCharts fails to reliably re-connect. Sometimes it does, but more often ...
by fbertram
05 Jan 2015
Forum: MultiCharts
Topic: MC for Interactive Brokers (automated trading of portfolio)?
Replies: 6
Views: 2489

Re: MC for Interactive Brokers (automated trading of portfol

Hi Quantum, no, it doesn't. That's exactly what I am doing with end-of-day data coming from MB Trading. In case your data come from a different source than your broker itself (like they do for me), you would need to set up symbol mapping - which is easily done. Regarding Henry's comment: Please noti...
by fbertram
05 Jan 2015
Forum: MultiCharts
Topic: MC for Interactive Brokers (automated trading of portfolio)?
Replies: 6
Views: 2489

Re: MC for Interactive Brokers (automated trading of portfol

Hi Quantum, I am actually using MultiCharts's Portfolio Trader for an algorithm that trades 5-10 stocks out of a pool of about 180 stocks. I find the Portfolio Trader extremely well done, supporting everything that's required to develop, backtest, analyze and automate such a trading scheme. Regardin...
by fbertram
03 Jan 2015
Forum: MultiCharts
Topic: Auto-start of trading system
Replies: 4
Views: 2361

Re: Auto-start of trading system

Hi Ulrich,

I am also experimenting with AutoIT. Any scripts you are willing to share would be highly appreciated.

Thank you,
best regards, Felix
by fbertram
03 Jan 2015
Forum: MultiCharts
Topic: Autotrading not submitting orders to IB
Replies: 11
Views: 3281

Re: Autotrading not submitting orders to IB

attached you'll find the logs. To make it easier to find things in there, I have colored them: * green section: system working as desired * red section: scheduled maintenance at IB * orange section: system not coming back up after IB is back online * blue section: system working OK after exit and re...
by fbertram
03 Jan 2015
Forum: MultiCharts
Topic: Autotrading not submitting orders to IB
Replies: 11
Views: 3281

Re: Autotrading not submitting orders to IB

OK, I gained some more insight during IB's nightly system maintenance. Here is what's happening: * IB servers go down (e.g. for scheduled maintenance) * IB Gateway keeps re-connecting every 30 seconds or so and fails (which is correct) * Portfolio Trader keeps re-connecting every 60 seconds or so (a...
by fbertram
02 Jan 2015
Forum: MultiCharts
Topic: Autotrading not submitting orders to IB
Replies: 11
Views: 3281

Re: Autotrading not submitting orders to IB

Hi TJ, thanks for your reply. Well, from the network perspective, my MultiCharts machine is local. Looking at the log, it seems there was something wrong at 4:27am, so 2 hours before the session began. However, the way I understand the log it was all recovered well in time. So I am not sure what I a...
by fbertram
02 Jan 2015
Forum: MultiCharts
Topic: Autotrading not submitting orders to IB
Replies: 11
Views: 3281

Re: Autotrading not submitting orders to IB

Hi TJ,

I am using a dedicated headless system in my network, which I am logging into via Remote Desktop. Not sure that is the remote system you had in mind. Or did I completely misunderstand your question?

Thank you,
best regards, Felix
by fbertram
02 Jan 2015
Forum: MultiCharts
Topic: Autotrading not submitting orders to IB
Replies: 11
Views: 3281

Autotrading not submitting orders to IB

Dear MultiCharts fans, I am experiencing some issues with auto trading. I am using Portfolio Trader on a portfolio of about 180 stocks of daily data. My data are retrieved from MB Trading and my orders are submitted through IB Gateway. I am starting auto trading at night. Due to the way MultiCharts ...
by fbertram
31 Dec 2014
Forum: MultiCharts
Topic: Auto-start of trading system
Replies: 4
Views: 2361

Auto-start of trading system

Dear MultiCharts fans, I'd like to set up my trading machine such that it automatically performs scheduled restarts. To do so, I would need to start Portfolio Trader and IB Gateway through a batch file or macro. Has anybody done something similar? Any hints, suggestions or expected pitfalls? Thank y...
by fbertram
30 Dec 2014
Forum: MultiCharts
Topic: Orders limited to 65,000 shares? [SOLVED]
Replies: 3
Views: 1519

Re: Orders limited to 65,000 shares? [SOLVED]

never mind... found it. I expected the option to be under the signal and not the strategy.

Cheers, Felix
by fbertram
30 Dec 2014
Forum: MultiCharts
Topic: Orders limited to 65,000 shares? [SOLVED]
Replies: 3
Views: 1519

Re: Orders limited to 65,000 shares? [SOLVED]

Hi MATricks,

thanks a lot for your hint. I can see the option you described, when adding my signal to a chart. Unfortunately, I am using Portfolio Trader - does the same option exist there? If so, how do I get to it? If not, is there a workaround?

Thank you,
best regards, Felix
by fbertram
29 Dec 2014
Forum: MultiCharts
Topic: Orders limited to 65,000 shares? [SOLVED]
Replies: 3
Views: 1519

Orders limited to 65,000 shares? [SOLVED]

Dear MultiCharts fans, I am using PortfolioTrader to trade on daily data. I am retrieving data through MB Trading and am submitting orders through IB Gateway. My orders are generated by the trading signal and then resized through the MM signal using pmms_strategy_set_entry_contracts. It seems that t...
by fbertram
27 Dec 2014
Forum: MultiCharts
Topic: Interactive Brokers data feed?
Replies: 2
Views: 1873

Re: Interactive Brokers data feed?

Thanks Josh!
by fbertram
27 Dec 2014
Forum: MultiCharts
Topic: Interactive Brokers data feed?
Replies: 2
Views: 1873

Interactive Brokers data feed?

Dear MultiCharts fans, I am having some difficulties with retrieving data from Interactive Brokers. I have TWS installed and MultiCharts is working with it, at least symbol lookup and submitting orders to a paper trading account work fine. TWS is showing me data in various resolutions. However, I am...
by fbertram
25 Nov 2014
Forum: MultiCharts
Topic: Scanner: # of bars calculated [SOLVED]
Replies: 28
Views: 8713

Re: Scanner: # of bars calculated [SOLVED]

Hi Henry, thanks a lot for your follow up. Please have a look at this code for an indicator: variables: var_one(0), var_sum(0); var_one = 1; var_sum = Summation(var_one, 100); Plot1(var_sum, "sum"); Plot2(CurrentBar, "current bar"); While this is not what I am doing in my indicator, it shows the sam...
by fbertram
23 Nov 2014
Forum: MultiCharts
Topic: Scanner: # of bars calculated [SOLVED]
Replies: 28
Views: 8713

Re: Scanner: # of bars calculated [SOLVED]

Hi TJ, thanks again for your note. I have understood MaxBasrBack now and I am thankful for you pointing that out to me. I agree I don't need to play around with it. Unfortunately we are not getting closer to answering my original question: how can I control the number of bars calculated in the scann...
by fbertram
22 Nov 2014
Forum: MultiCharts
Topic: Scanner: # of bars calculated [SOLVED]
Replies: 28
Views: 8713

Re: Scanner: # of bars calculated [SOLVED]

Hi TJ, Thanks again for your follow-up. As said before, I think I understand what MaxBarsBack is doing and I agree with your picture. I am not sure how to use that information to solve my problem though. Let's assume a line of code like this: HH = Highest(High, 20) Here it is quite clear that I will...
by fbertram
22 Nov 2014
Forum: MultiCharts
Topic: Scanner: # of bars calculated [SOLVED]
Replies: 28
Views: 8713

Re: Scanner: # of bars calculated [SOLVED]

Hi TJ, From what I have seen, MaxBarsBack only auto-adjusts to about 50. Unfortunately, I need more than that. Also, that is not fully solving my problems. I am not only referencing bars in the past (which MaxBarsBack allows me to do), but I also need to reference results from previous calculations ...
by fbertram
21 Nov 2014
Forum: MultiCharts
Topic: Scanner: # of bars calculated [SOLVED]
Replies: 28
Views: 8713

Re: Scanner: # of bars calculated [SOLVED]

Hi Ben, Hi TJ, thank you so much for both your detailed responses. I am sorry for not getting back earlier, but I was traveling for business... I think I have understood MaxBarsBack and CurrentBar, thanks for your explanations. However, I'd like to go back to my original question. How can I control ...
by fbertram
15 Nov 2014
Forum: MultiCharts
Topic: Scanner: # of bars calculated [SOLVED]
Replies: 28
Views: 8713

Re: Scanner: # of bars calculated [SOLVED]

Hi Ben, thanks a lot for your reply. It seems things look different (better) on your end. Please see the attached screenshot: * I have set the custom data range to 320 bars * I actually have enough data for 320 bars, see the chart and data window * my indicator however is only seeing 70 bars Any fur...
by fbertram
15 Nov 2014
Forum: MultiCharts
Topic: Scanner: # of bars calculated [SOLVED]
Replies: 28
Views: 8713

Scanner: # of bars calculated [SOLVED]

Dear MultiCharts fans, I am working on an indicator for the scanner which needs about 200 bars to work properly. I am stuck with the scanner calculating less bars than that - and can't seem to figure out how to increase the window. Here is what I tried: * editing the properties of my indicator in Po...
by fbertram
05 Nov 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

Hi Andrew,

thank you for following up. I have sent the data to support@multicharts.com. Please let me know if there is anything else I can provide.


Thank you,
best regards, Felix
by fbertram
04 Nov 2014
Forum: MultiCharts
Topic: Portfolio Trader: when does auto-trading start?
Replies: 1
Views: 987

Portfolio Trader: when does auto-trading start?

Dear MultiCharts fans, I am working with Portfolio Trader and am in the process of getting auto-trading set up. I am working with daily charts. I have enabled auto-trading long after the markets have closed. What I hope would happen now is, that MultiCharts places the orders that should be generated...
by fbertram
04 Nov 2014
Forum: MultiCharts
Topic: issues connecting to MB Trading Account [SOLVED]
Replies: 2
Views: 1322

Re: issues connecting to MB Trading Account [SOLVED]

Hi Henry, thank you for your response. As far as I can see, the problem was related to parts of MultiCharts still running, even though the application should have been closed. Things seem to work fine now, but it seems that with MB Trading the application gets sometimes quite sluggish. Thank you, be...
by fbertram
03 Nov 2014
Forum: MultiCharts
Topic: issues connecting to MB Trading Account [SOLVED]
Replies: 2
Views: 1322

issues connecting to MB Trading Account [SOLVED]

Dear MultiCharts fans, I have an issue connecting to my MB Trading account. I can confirm that: * MBT Desktop Pro is installed, showing account information and charts * I have added the brokerage account, MultiCharts says it's connected * I have added the datasource, MultiCharts does not complain * ...
by fbertram
02 Nov 2014
Forum: MultiCharts
Topic: Tracking strategy performance in Portfolio Trader [SOLVED]
Replies: 13
Views: 4788

Re: Tracking strategy performance of individual instruments  [SOLVED]

Hi Strelow,
I uploaded the files as PLA to the bug:
https://www.multicharts.com/pm/viewissu ... no=MC-1789

Thank you,
best regards, Felix
by fbertram
02 Nov 2014
Forum: MultiCharts
Topic: Switching Database location:Need to modify the Preferences?
Replies: 2
Views: 1205

Re: Switching Database location:Need to modify the Preferenc

Hi Martin, moving databases should be quite simple. Here is how I did it: 1) copy databases to 'new' location 2) start MultiCharts as administrator and change the location in the preferences, exactly the screen you showed in your post 3) quit Multicharts 4) remove databases from the 'original' locat...
by fbertram
02 Nov 2014
Forum: MultiCharts
Topic: Tracking strategy performance in Portfolio Trader [SOLVED]
Replies: 13
Views: 4788

Re: Tracking strategy performance of individual instruments  [SOLVED]

Hi Strelow,

the sample is in PowerLanguage (aka EasyLanguage) for the regular MultiCharts edition.

Thank you,
best regards, Felix
by fbertram
02 Nov 2014
Forum: MultiCharts
Topic: Tracking strategy performance in Portfolio Trader [SOLVED]
Replies: 13
Views: 4788

Re: Tracking strategy performance of individual instruments  [SOLVED]

I have submitted some demo code, showing how this feature would be used:
https://www.multicharts.com/pm/viewissu ... no=MC-1789

Please vote!

Thank you,
best regards, Felix
by fbertram
30 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

Hi Andrew,
Please find my updates in the bug tracker. There were issues with my data... but fixing the data won't fix the problem in all instances.

Thank you,
Best regards, Felix
by fbertram
29 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

Hi TJ,

yes, I have. 10/22 is included in the data for both stocks, nothing was sticking out there. Is there a semi-automatic way to check the data? Did you see issues w/ FreeQuotes before?

Thank you,
best regards, Felix
by fbertram
29 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

Hi TJ, thanks for your message. Here is the output from bar status: date=1141001.00 barstatus= 2.00 datetime_bar_update=10/1/2014 14:30:00.000 date=1141002.00 barstatus= 2.00 datetime_bar_update=10/2/2014 14:30:00.000 date=1141003.00 barstatus= 2.00 datetime_bar_update=10/3/2014 14:30:00.000 date=11...
by fbertram
28 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

Hi Andrew, unfortunately I cannot confirm your suggestion. I have created a new project, now only including 2 stocks, both traded on NASDAQ. While the problem occurs much less often, it is still there: 10/10/2014 14:30:00.000 10/13/2014 14:30:00.000 10/14/2014 14:30:00.000 10/15/2014 14:30:00.000 10...
by fbertram
28 Oct 2014
Forum: MultiCharts
Topic: Tracking strategy performance in Portfolio Trader [SOLVED]
Replies: 13
Views: 4788

Re: Tracking strategy performance of individual instruments  [SOLVED]

Hi Henry, I am not sure I fully understand what you are suggesting. In case I misunderstood you, please clarify a bit more what you had in mind. To measure the 'raw' performance, I need to have the signals associated with the instruments run undisturbed. Unfortunately, that is not the case. The sign...
by fbertram
28 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

Hi Andrew, thanks a lot for your response. Unfortunately, I cannot check your suggestion with MultiCharts right now. However, I did look into the PWS file I sent to see if I can see what you are seeing. There are 10 stocks in the sample. They all use Free Quotes as the data feed. They all use the de...
by fbertram
27 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

I have attached some files showing a minimalistic version of the issue I am seeing. Unfortunately, this is rather critical to me, as it messes up my strategy.

Hope this helps!

Thank you,
best regards, Felix
by fbertram
27 Oct 2014
Forum: MultiCharts
Topic: Tracking strategy performance in Portfolio Trader [SOLVED]
Replies: 13
Views: 4788

Re: Tracking strategy performance of individual instruments  [SOLVED]

Hi Henry, thanks a lot for following up. What I'd like to do, is to create a portfolio MM signal, which uses the trading performance (based on the signals used for entering raw orders) as the criterion to make portfolio decisions. In order to do that, I need to be able to determine the 'raw' perform...
by fbertram
27 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Re: Portfolio Trader: MM Signal called multiple times per ba [SOLVED]

Hi Andrew, no, my signals do not reference any additional data series. The portfolio has about 180 instruments in it, all of them 1 day. I also forgot to mention that I am seeing this during backtesting. Please let me know if there is any other information I can provide to help track this down. Hi J...
by fbertram
26 Oct 2014
Forum: MultiCharts
Topic: Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]
Replies: 21
Views: 7386

Portfolio Trader: MM Signal called multiple times per bar? [SOLVED]

Dear MultiChart fans, I am working on signals for use with Portfolio Trader. I have signals which will generate raw orders for all the instruments and then a MM signal, doing some additional magic on top. All my instruments are added as 1 day. Somehow, I see that my MM Signal is called multiple time...
by fbertram
25 Oct 2014
Forum: MultiCharts
Topic: Tracking strategy performance in Portfolio Trader [SOLVED]
Replies: 13
Views: 4788

Tracking strategy performance in Portfolio Trader [SOLVED]

Dear MultiChart team, let me first mention that I am really thrilled about the things I can do with the MultiCharts Portfolio Trader. It seems there is virtually nothing that can be done with Portfolio Trader - but I am stuck with a problem that seems more effort to solve than it needs to be. Unless...

Go to advanced search