Search found 49 matches

by novaleaf
22 May 2015
Forum: MultiCharts .NET
Topic: How to determine if a previous bar is LastBarInSession?
Replies: 4
Views: 2913

Re: How to determine if a previous bar is LastBarInSession?

Hi Josh, but putting your logic in CalcBar() and using Bars.LastBarInSession doesn't work in this case, because CalcBar() is never called for the first "MaxBarsBack" bars. So I need to walk the past 50 bars in MaxBarsBack, and determine if there are any session breaks there. It seems there currently...
by novaleaf
21 May 2015
Forum: MultiCharts .NET
Topic: How to determine if a previous bar is LastBarInSession?
Replies: 4
Views: 2913

How to determine if a previous bar is LastBarInSession?

you can determine if the current bar is the last bar in a session via this.Bars.LastBarInSession how can you determine if a previous bar in your history is the last bar of a session? I need this because the way MaxBarsBack works, I wish to retroactively do calculations in the StartCalc() method, and...
by novaleaf
21 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

for anyone who may be interested, here is my daily ohlcv indicator that takes MaxBarsBack history into account. it seems to be the solution to my issue.

viewtopic.php?f=20&t=48526&p=115658#p115658
by novaleaf
21 May 2015
Forum: User Contributed Studies
Topic: Example Session Indicators framework
Replies: 2
Views: 3493

Re: Example Session Indicators framework

modified to improve:

1) now takes MaxBarsBack into account (walks and does calc on history bars)

2) fixed volume calculation so it works with ascii mapped or streaming instruments.

3) added a bunch of debug output. comment them if you don't like it.
by novaleaf
21 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

OK, so I think I understand MaxBarsBack. Here is my summary for anybody in the future who's struggling with this issue. MaxBarsBack is basically there to make the developer/user not have to worry about the length of data that's available. The reason my daily ohlc indicator works with a zero maxBarsB...
by novaleaf
21 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

Hi Henry, thank you for the details. I agree/admit that this issue seems to be my misunderstanding on how MaxBarsBack works. I have an indicator that needs to accumulate each day's O/H/L/C but I can't do that if it's start is delayed by MaxBarsBack, as my ascii file contains only the needed bars. (9...
by novaleaf
20 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

UPDATE: *sigh* unfortunatly JoshM's suggestion does not work for me. It looks as if the "Maximum number of bars study will reference" does also set a strategy's MaxBarsBack value (in addition to truncating the first N bars when portfolio testing) I did not see this when first testing the workaround,...
by novaleaf
20 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

EDIT: does not work, see following post. Thank you so much Josh. Indeed, once I knew to right-click on the root node of the Portfolio Tree, I was able to access the Properties window as you said, and setting "Maximum number of bars study will reference" to zero solves the problem. I will update my ...
by novaleaf
19 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

here is my workaround (and I tested it before writing this!)

I duplicate the first (09:30) bar 50 times, but set the times of the duplicates from 08:01 to 08:50. This workaround is obviously not ideal but it'll suffice for my current usage.
by novaleaf
19 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

slight clarification:

The first 50 bars of the text file are eaten by portfolio trader. I originally said 51, but I forgot that the first line is the column header so that doesn't count.
by novaleaf
19 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

Additionally, in charts (where you can set the MaxBarBack property) the default is 50 and ASCII mapped charts+signals work fine, no bars are skipped and I never had to mess with the MaxBarsBack property.
by novaleaf
19 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: portfolio backtesting ascii map files starts on line 52

Hi Henry, In the Portfolio Trader, Signals do not have a "show properties" option. You can only format the signal.
by novaleaf
19 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: BUG: portfolio backtesting ascii map files starts on lin

Reading the docs it looks very suspicious that the default value for MaxBarsBack is 50 (since I am seeing 51 bars skipped) so seems likely to be related, but unfortunately, I do not know where to set the MaxBarsBack setting in the portfolio trader. When I set the "Data Range" to 5000 Bars Back from ...
by novaleaf
15 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

Re: BUG: portfolio backtesting ascii map files starts on lin

I pretty much verified this. the first 51 bars "to be used" in the file are eaten. if I add 51 extra lines on the weekend (20150426) they are ignored, and the first 51 lines from 20150427 are still eaten. if I add 51 extra lines for friday (20150424) those are eaten and all my lines for 20150427 are...
by novaleaf
15 May 2015
Forum: MultiCharts .NET
Topic: portfolio backtesting ascii map files starts on line 52
Replies: 15
Views: 6019

portfolio backtesting ascii map files starts on line 52

pretty strange bug I'm running into. I load a bunch of ascii-mapped instruments via quote manager. I can chart (and load chart signals) fine. But when I add these to portfolio trader and try to backtest, it skips the first 51 lines of the file!! (skips 50 data-rows if you exclude the header). So the...
by novaleaf
15 May 2015
Forum: MultiCharts .NET
Topic: ascii mapping doesn't import volume data [SOLVED]
Replies: 2
Views: 2821

Re: ascii mapping doesn't import volume data [SOLVED]

thank you Josh, I switched to use Bars.TrueVolume().Value and now it provides the right volume data for ascii mapped or exchange realtime data.
by novaleaf
14 May 2015
Forum: MultiCharts .NET
Topic: ascii mapping doesn't import volume data [SOLVED]
Replies: 2
Views: 2821

ascii mapping doesn't import volume data [SOLVED]

I have a text file with data such as the following, but volume information, though mapped properly, is not available in charts or this.Bar.Volume do I need to name the volume column differently? or something else? symbol,date,time,open,high,low,close,volume MBVT,20150427,0930,29.260000,29.260000,29....
by novaleaf
14 May 2015
Forum: MultiCharts .NET
Topic: how to get name of security inside an indicator or strategy? [SOLVED]
Replies: 3
Views: 2972

Re: how to get name of security inside an indicator or strat [SOLVED]

thanks henry, that is

Code: Select all

this.Bars.Info.Name
for anyone who need it.
by novaleaf
14 May 2015
Forum: MultiCharts .NET
Topic: My own namespace for function [SOLVED]
Replies: 4
Views: 3582

Re: My own namespace for function [SOLVED]

my idea, not verified: it's a bit supprising to me that it works.... must mean that multicharts can use the binary compiled by visual studio. What version of visual studio are you using? I think Power Editor expects all your code to be in it's single folder. if not, it won't watch the file for chang...
by novaleaf
13 May 2015
Forum: MultiCharts .NET
Topic: how to get name of security inside an indicator or strategy? [SOLVED]
Replies: 3
Views: 2972

Re: how to get name of security inside an indicator or strat [SOLVED]

I see the symbol listed at the top of a thrown exception, which is probably good enough, but any way I can actually obtain the symbol itself?
by novaleaf
13 May 2015
Forum: MultiCharts .NET
Topic: how to get name of security inside an indicator or strategy? [SOLVED]
Replies: 3
Views: 2972

how to get name of security inside an indicator or strategy? [SOLVED]

Hello, I am trying to debug a portfolio strategy, one of my securities is causing an exception to be thrown from my strategy. How can I obtain the name of the security that is causing the error? I am trying to use Output.WriteLine but don't see where to get the name of the current security. Thank you.
by novaleaf
07 May 2015
Forum: MultiCharts .NET
Topic: CurrentPosition.Profit always zero [SOLVED]
Replies: 2
Views: 2571

Re: CurrentPosition.Profit always zero [SOLVED]

OK, the PDF doc is wrong.


I just output the value of CurrentPosition.OpenProfit and it is NOT zero. The two values (Profit and OpenProfit) are not the same.

I assume that Profit must be "closed profit".
by novaleaf
07 May 2015
Forum: MultiCharts .NET
Topic: CurrentPosition.Profit always zero [SOLVED]
Replies: 2
Views: 2571

CurrentPosition.Profit always zero [SOLVED]

Hi I'm trying to construct my first strategy. I think I have figured out the way "managed orders" work now (always needing to emit the currently desired position) however I am wondering why CurrentPosition.Profit is always zero. According to the Programmer Guide PDF: CurrentPosition.Profit = Current...
by novaleaf
07 May 2015
Forum: User Contributed Studies
Topic: Example Session Indicators framework
Replies: 2
Views: 3493

Re: Example Session Indicators framework

fyi I modified the above code: as I use a List<T> I needed to clear it during StartCalc().

also added a sample plot of volume for example and debugging purposes. (comment out the startCalc() lines and then jump back and backtest to see the issue)
by novaleaf
06 May 2015
Forum: MultiCharts .NET
Topic: Using standard C# array in strategy
Replies: 5
Views: 3425

Re: Using standard C# array in strategy

@Henry, I assumed arrays would cause problems with backtesting / historical data: either scrolling back or jumping to and replaying timesteps. Is this not the case? Indeed, I just ran into this problem when "jumping" back to replay timesteps. If you use your own array or list, you need to clear or ...
by novaleaf
05 May 2015
Forum: MultiCharts .NET
Topic: Using standard C# array in strategy
Replies: 5
Views: 3425

Re: Using standard C# array in strategy

@Henry, I assumed arrays would cause problems with backtesting / historical data: either scrolling back or jumping to and replaying timesteps. Is this not the case?
by novaleaf
04 May 2015
Forum: User Contributed Studies
Topic: Example Session Indicators framework
Replies: 2
Views: 3493

Example Session Indicators framework

code I wrote for constructing session-level indicators. can be the starting point for your own more elaborate stuff. using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using PowerLanguage.Function; namespace PowerLanguage.Indicator { /// <summary> /// our custom...
by novaleaf
03 May 2015
Forum: MultiCharts .NET
Topic: Accessing Indicator from Signal [SOLVED]
Replies: 15
Views: 17267

Re: Accessing Indicator from Signal [SOLVED]

@MultiC: to get access to an indicator's variables, you need to make them public. That's all. Hello there, This AddIndicator method is very limited in its use; it just adds the custom indicator to the signal but it still doesn't allow one to get access to the variables for one to use in the indicato...
by novaleaf
30 Apr 2015
Forum: MultiCharts .NET
Topic: How to plot text in Data Window? [SOLVED]
Replies: 1
Views: 2290

How to plot text in Data Window? [SOLVED]

Hi, trying to figure out how to output text in the data window. The text shows up on the current bar's status line (top of indicator window) but shows as "N/A" in the Data Window. I would like to see the text for each bar when I hover the mouse over it. Here is the code I'm using: private IPlotObjec...
by novaleaf
24 Apr 2015
Forum: MultiCharts .NET
Topic: Unable to automatically update charts using ASCII mapping
Replies: 8
Views: 6606

Re: Unable to automatically update charts using ASCII mappin

Not meant to be anything fancy, sorry if my language is.... complex.

the chart creation time is the time in which you create the chart, and/or when you reload the chart's data.
by novaleaf
24 Apr 2015
Forum: MultiCharts
Topic: Ascii Mapping - automatically update charts
Replies: 7
Views: 4084

Re: Ascii Mapping - automatically update charts

you can see my analysis of the situation, from a couple weeks ago: viewtopic.php?f=19&t=48344

using multicharts.net 9.x
by novaleaf
21 Apr 2015
Forum: MultiCharts .NET
Topic: "Best Practice" to backtest a dynamic portfolio strategy?
Replies: 2
Views: 2057

Re: "Best Practice" to backtest a dynamic portfolio strategy

Hi ABC, Thank you so much for the suggestion! I'm a bit worried that loading up 25k unused securities might have a performance hit... However I can't figure out a better approach in my stabs at the documentation, so I will try your approach. I will write back informing if it turns out to be (in)feas...
by novaleaf
20 Apr 2015
Forum: MultiCharts .NET
Topic: "Best Practice" to backtest a dynamic portfolio strategy?
Replies: 2
Views: 2057

"Best Practice" to backtest a dynamic portfolio strategy?

Hello, I am trying to put together my first "real" backtest, and would appreciate some help on figuring out how to design the system: For each day, I have about 100 ASCII files containing minute-bar data for stocks deemed "interesting" by an external process (SEC filing data/etc). This selection cha...
by novaleaf
09 Apr 2015
Forum: MultiCharts .NET
Topic: Unable to automatically update charts using ASCII mapping
Replies: 8
Views: 6606

Re: Unable to automatically update charts using ASCII mappin

ok, so I figured out the issue (with Henry's help). The last value in your ascii data MUST be less than 1 minute old when * CONSTRUCTING * the chart. This puts the chart into some kind of "realtime" mode. If the last value is more than 1 minute old, the chart is put into some kind of "historical" mo...
by novaleaf
18 Mar 2015
Forum: MultiCharts .NET
Topic: Unable to automatically update charts using ASCII mapping
Replies: 8
Views: 6606

Unable to automatically update charts using ASCII mapping

Hi, I see from the documentation and forum posts that adding lines to an ascii mapped file should automatically update a chart plotting it. https://www.multicharts.com/trading-software/index.php/Mapping_ASCII https://www.multicharts.com/discussion/viewtopic.php?f=19&t=47622 https://www.multicharts.c...
by novaleaf
03 Feb 2015
Forum: MultiCharts .NET
Topic: Data feeds from custom sources, defined in code? [SOLVED]
Replies: 3
Views: 2843

Re: Data feeds from custom sources, defined in code? [SOLVED]

Thank you Henry,

Basically I have a strategy that picks 200 candidate securities every day, so to backtest that I will need to import thousands over the span of a year.

The ASCII mapping workflow seems to meet my use-case needs, so I will give that a try!
by novaleaf
31 Jan 2015
Forum: MultiCharts .NET
Topic: Data feeds from custom sources, defined in code? [SOLVED]
Replies: 3
Views: 2843

Re: Data feeds from custom sources, defined in code? [SOLVED]

Alternatively, if I could import/construct the symbol data directly in c# and inject it into the DataLoader/Symbol Server, that would be wonderful.

Thank you!
by novaleaf
30 Jan 2015
Forum: MultiCharts .NET
Topic: Data feeds from custom sources, defined in code? [SOLVED]
Replies: 3
Views: 2843

Data feeds from custom sources, defined in code? [SOLVED]

Hi, I just subscribed to activetick, which provides historical and realtime market data. Given an arbitrary selection of symbols+date ranges (as defined in a csv), I would like to procedurally import this data into multicharts. Given that activetick is NOT one of the pre-defined data-sources, is the...
by novaleaf
02 May 2014
Forum: MultiCharts .NET
Topic: All of my studies GONE!!!! [SOLVED]
Replies: 6
Views: 2521

Re: All of my studies GONE!!!! [SOLVED]

did you restart your computer / multicharts? i deleted my .vb files and then saw that the mc.net editor complains, and wouldnt compile anything anymore. closing multicharts and the editor, then restarting, i see it rebuilds the project and puts back the missing files. perhaps you could try the same.
by novaleaf
24 Apr 2014
Forum: MultiCharts .NET
Topic: VariableSeries inside FunctionSeries = 1 Bar lag ? [SOLVED]
Replies: 5
Views: 2432

Re: VariableSeries inside FunctionSeries = 1 Bar lag bug? [SOLVED]

Hello Henry. It sounds like there is an internal list of objects (functions/indicators/signals) in an "update queue" to be processed every update. Those that are actively referenced are updated "just in time". This makes perfect sense, and your explanation really does help me understand the workings...
by novaleaf
24 Apr 2014
Forum: MultiCharts .NET
Topic: VariableSeries inside FunctionSeries = 1 Bar lag ? [SOLVED]
Replies: 5
Views: 2432

Re: VariableSeries inside FunctionSeries = 1 Bar lag bug? [SOLVED]

here is an indicator you can add to a chart to repro the bug. uncomment line 29 to make the bug disapear. using System; using System.Drawing; using System.Linq; using PowerLanguage.Function; namespace PowerLanguage.Indicator{ public class _NL_Normalized : IndicatorObject { public _NL_Normalized(obje...
by novaleaf
23 Apr 2014
Forum: MultiCharts .NET
Topic: VariableSeries inside FunctionSeries = 1 Bar lag ? [SOLVED]
Replies: 5
Views: 2432

VariableSeries inside FunctionSeries = 1 Bar lag ? [SOLVED]

I think I found a bug, please let me know if it's a misunderstanding, or there is a better workaround for me. please see the bottom attached src of my "Returns" function. I am plotting the values of returns.percentChange.Value (a VariableSeries). Here seems to be the bug: 1) if I do not access retur...
by novaleaf
23 Apr 2014
Forum: MultiCharts .NET
Topic: Best way to make synthetic data for indicators+strategies?
Replies: 6
Views: 2767

Re: Best way to make synthetic data for indicators+strategie

Hi Henry, thank you for those details. I will go the AddIndicator () route to reuse computations.

Is there somewhere I can read descriptions of the pre-built functions/indicators/signals?
by novaleaf
23 Apr 2014
Forum: MultiCharts .NET
Topic: Best way to make synthetic data for indicators+strategies?
Replies: 6
Views: 2767

Re: Best way to make synthetic data for indicators+strategie

after more research (i'm a noob) I see this.AddIndicator() , so I am assuming that the best practice is to put the reusable logic into indicators and to instantiate new copies of these in each dependent study. I suppose that'll work, but it would be nice to have a single instance of the dependency. ...
by novaleaf
22 Apr 2014
Forum: MultiCharts .NET
Topic: Best way to make synthetic data for indicators+strategies?
Replies: 6
Views: 2767

Re: Best way to make synthetic data for indicators+strategie

I see that I can add multiple instruments to a chart, and then using thisIndicator.MaxDataStream and this.BarsOfData() I should be able to access the data to construct my synthetic. However what's the best way to share this with other indicators or strategies? I am guessing that I should have my "ma...
by novaleaf
22 Apr 2014
Forum: MultiCharts .NET
Topic: Editing of indicator source does not update chart [SOLVED]
Replies: 2
Views: 1283

Re: Editing of indicator source does not update chart [SOLVED]

after more experimenting, I see that inputs and plot configurations (like Histogram / Line) are not updated after editing, though the code/algorithm is. Is this a bug in Multicharts.net? or is there a workaround so I can force my indicator to completely refresh/reload from source? Currently my mitig...
by novaleaf
22 Apr 2014
Forum: MultiCharts .NET
Topic: Best way to make synthetic data for indicators+strategies?
Replies: 6
Views: 2767

Best way to make synthetic data for indicators+strategies?

Hello, I'd like to know the best way to construct a time series, such as: 1) price difference between two securities 2) percentage change of a single security and use these in multiple strategies/indicators without copy/pasting the code? is there such a thing as a synthetic security? or another "bes...
by novaleaf
22 Apr 2014
Forum: MultiCharts .NET
Topic: Editing of indicator source does not update chart [SOLVED]
Replies: 2
Views: 1283

Editing of indicator source does not update chart [SOLVED]

Hello I'm following the tutorial found in the multicharts.net programming guide (section 3). However the added "TrendPower" indicator does not automatically update itself in the chart. I can edit the .cs file and then a few seconds later I see the chart refresh itself, but the changes were not appli...
by novaleaf
20 Apr 2014
Forum: MultiCharts .NET
Topic: can I backtest an algo without a brokerage acct? [SOLVED]
Replies: 1
Views: 1211

can I backtest an algo without a brokerage acct? [SOLVED]

I am new to Multicharts and have some ascii data imported, I'd like to know if I can backtest algorithms without connecting to a brokerage account? I don't need to papertrade, but I am looking through the dev guide pdf and wiki, but it seems like I might need a brokerage account to backtest too can ...

Go to advanced search