Search found 33 matches

by cnbiz850
26 May 2014
Forum: MultiCharts
Topic: question about expert commentary
Replies: 1
Views: 792

question about expert commentary

Having read through the wiki on this but still feeling unclear about a couple things, I hope someone can help clarify. 1) Does the opening of a commentary window followed by a click on a bar cause the entire strategy to be recalculated? 2) The recalculation also causes orders to be resend in live tr...
by cnbiz850
31 Mar 2014
Forum: MultiCharts
Topic: help with a trading probelm
Replies: 7
Views: 1815

Re: help with a trading probelm

What is the mode of auto trading ? It is AA with positions set to be the same as chart. What are the values from Strategy Positions tab of Order and Position Tracker window ? For the example, I did not get that recorded. But I just had another occurrence of the problem yesterday. The case was that ...
by cnbiz850
29 Mar 2014
Forum: MultiCharts
Topic: help with a trading probelm
Replies: 7
Views: 1815

Re: help with a trading probelm

Andrew, Thanks very much for the reply. My order is just as you advised. Perhaps I have complicated with my description. I think the essence of my question is this, to put it simply: Can anyone explain, in terms of number of contracts ordered, why there might be a difference between what is shown on...
by cnbiz850
28 Mar 2014
Forum: MultiCharts
Topic: help with a trading probelm
Replies: 7
Views: 1815

Re: help with a trading probelm

The execution code is simple.

sellshort("S1") -NewLots-Currentcontracts contracts next bat at market;

where NewLots, a negative number, is the number of short contracts I want to open.
by cnbiz850
28 Mar 2014
Forum: MultiCharts
Topic: help with a trading probelm
Replies: 7
Views: 1815

help with a trading probelm

The problem is basically MC sends a much larger order than my strategy commands. For instance, when there is a long position of 8 contracts in the account and the strategy commands to short 13 contracts (essentially closing the long position and opening a short position of 5 contracts), it actually ...
by cnbiz850
25 Nov 2013
Forum: MultiCharts
Topic: Is there a way to profile the performance of a strategy?
Replies: 1
Views: 1070

Is there a way to profile the performance of a strategy?

How can I easily find out which part (or which statement) of a strategy takes more CPU time?
by cnbiz850
25 Nov 2013
Forum: MultiCharts
Topic: A buytocover question
Replies: 6
Views: 1977

Re: Is this a buytocover bug?

Thank you. That only applies to 8.5 and above. I will try it when the agent releases 8.5, supposedly next month.
cnbiz850, please add the following attribute to your code:

Code: Select all

[SameExitFromOneEntryOnce=False]
Here is what it does.
by cnbiz850
25 Nov 2013
Forum: MultiCharts
Topic: A buytocover question
Replies: 6
Views: 1977

Re: Is this a buytocover bug?

Hi JoshM, If you check the screenshot I attached, you will find that trades are not missed. The only problem is that size is not as specified. Also, this problem does not just happen on a specific day - everyday is the same with the demo code. I don't see anything special with settings at Strategy P...
by cnbiz850
24 Nov 2013
Forum: MultiCharts
Topic: A buytocover question
Replies: 6
Views: 1977

Re: Is this a buytocover bug?

Thank you JoshM. Using time for entry and exit is only to demostrate the problem. The issue occurred during backtesting, so it has nothing to do with liquidity. There must be something else affecting buytocover's execution. The drawback of specifying the exact time for submitting an order (e.g., 14:...
by cnbiz850
23 Nov 2013
Forum: MultiCharts
Topic: A buytocover question
Replies: 6
Views: 1977

A buytocover question

The following sample code does some entries and some exits on the 1-minute chart. The problem I have is that the exits at the end of day are NOT executed with the specified size during backtesting. Note the total size at the end is 15, but on my system it only exits 12. A screenshot is attached. Wou...
by cnbiz850
31 Jul 2013
Forum: MultiCharts
Topic: Multicharts on Linux
Replies: 7
Views: 8204

Re: Multicharts on Linux

I abandoned Win many years ago and most everything has a great solution on Linux, except trading software. Have to run MC in a XP VM. It is a shame especially since those critical requirements for financial trading such as stability, reliability and security are provided in Linux at a much higher le...
by cnbiz850
21 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

Thanks Andrew for the response. You can devide your script into 3 separate exit lines: if (time=430) then buytocover ("BC1") 5 contracts next bar at close-MinMove stop; if (time=431) then buytocover ("BC2") 5 contracts next bar at close-MinMove stop; if (time = 432) then buytocover ("BC3") 5 contrac...
by cnbiz850
19 Mar 2013
Forum: MultiCharts
Topic: PosTradeExitPrice doesn't work for open positions?
Replies: 1
Views: 1246

PosTradeExitPrice doesn't work for open positions?

The output of the demo code below is like: Trading Day: 1130318.00 Trade No.1 Exit price: 0.00 Trading Day: 1130318.00 Trade No.2 Exit price: 0.00 End of day of 1130318.00 Total number of trades: 4 ExitPrice of Trade No.0: 6224.00 End of day of 1130318.00 Total number of trades: 4 ExitPrice of Trade...
by cnbiz850
06 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

Have you drawn up a flowchart of your logic?
Mine is not that complex. Just some simple rules. But that part works well.
by cnbiz850
06 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

Easylanguage has been around for over 25 yrs, I am sure you are not the first person to attempt scaling in/out. This is an advanced level programming; it seems tedious, but is essential. I don't agree that this is an issue with Easylanguage. It is an internal restriction within MC that prohibits (f...
by cnbiz850
06 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

Still no response from MultiCharts. I take it that this issue is a fundamental flaw of MC. In the mean time, I cooked up a way to go around it - hard code enough cover statements in the program. I know it is not pretty. vars: MyCondition(false), Index(0); if (date <> date[1]) then begin // on the fi...
by cnbiz850
05 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

Any help from MultiCharts please.
by cnbiz850
03 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

To further on that, I separate the three cover orders and they execute OK. What am I missing here? It is very unfortunate that one can not separate the orders like this in real projects as they can be due to the same condition that just occurs at different time. if (date <> date[1]) then begin // on...
by cnbiz850
03 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

To clearly describe this problem, I made a simple test code. It should be added to 1-minute charts. In the code, I open a short position of 20 contracts at the market open on everyday, then cover 5 contracts each at 9:11, 9:16, and 10:02. Then just prior to 15:00, I close all out. In my system (MC 7...
by cnbiz850
03 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

TJ, Thanks very much again for the reply. I thought I described the situation clearly, but I am really sorry that perhaps my question was not clear enough. It was not about autotrade - it was about backtesting. It was on 1-minute bar chart. I set one trade per bar, and did NOT use bar magnifier nor ...
by cnbiz850
02 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Re: Backtesting order execution limited to once [SOLVED]

Thanks very much for the reply. I understand the complexity there. But the issue at hand is the second order not executed even when the condition was met. For instance: if (MyCondition) then begin print("BC20"); buytocover ("BC20") 20 contracts next bar at close-MinMove stop; end; print("BC20"); was...
by cnbiz850
02 Mar 2013
Forum: MultiCharts
Topic: Backtesting order execution limited to once [SOLVED]
Replies: 20
Views: 5811

Backtesting order execution limited to once [SOLVED]

Trying to understand with backtesting how scaling in and fading out strategies work. It appears that MC only execute order once. For instance, I opened a short position of 100 contracts at market open. Then at 9:11, an order to cover 20 contracts was generated, and it was shown on chart. Then at 9:1...
by cnbiz850
02 Dec 2012
Forum: MultiCharts
Topic: about GetStrategyName [SOLVED]
Replies: 1
Views: 1138

about GetStrategyName [SOLVED]

The help document indicates that GetStrategyName is for backward compatibility. What is the new function in its place? GetAppInfo doesn't seem to do it?
by cnbiz850
25 Nov 2012
Forum: MultiCharts
Topic: array handling somewhat awkward
Replies: 3
Views: 2077

Re: array handling somewhat awkward

Found a messy discrepancy related to this issue. LinRegArray has essentially the same code as LinearReg, indicating that it relies on the assumption that the most recent values are stored at the start of the array (i.e. value1 is toward 1 as in PriceValueArray[Value1] ). The result is, if the recent...
by cnbiz850
25 Nov 2012
Forum: MultiCharts
Topic: array handling somewhat awkward
Replies: 3
Views: 2077

array handling somewhat awkward

// demo code for calculating a moving average of an array Input: N(20), M(10); vars: ArrayMA(0); array: AP[](0); once array_setmaxindex(AP, N); // shift array elements to the left // as it can not be shifted to the right without erasing most of the values array_copy(AP, 2, AP, 1, N-1); // store a n...
by cnbiz850
23 Nov 2012
Forum: MultiCharts
Topic: question on stop order in bachtesting without IOG [SOLVED]
Replies: 1
Views: 895

question on stop order in bachtesting without IOG [SOLVED]

Here is how the calculation will be performed for MC 8.0 beta 3 and higher: Scenario A: Calculation on historical data. Regular mode. No IOG. No Bar Magnifier. The script is calculated on the bar close. It is considered that all prices were within the bar (Price movement assumption is used). Order ...
by cnbiz850
19 Nov 2012
Forum: MultiCharts
Topic: Bars Back Question
Replies: 8
Views: 2269

Re: Bars Back Question

Why would the chart only load 441 bars of a 60 minute chart when it is set to load 2000 bars?
I have a similar problem with Version 7.4.
by cnbiz850
07 Nov 2012
Forum: MultiCharts
Topic: input parameter preservation mishandling [SOLVED]
Replies: 4
Views: 1696

Re: input parameter preservation mishandling [SOLVED]

If you want to set all the charts to new input parameter values,
you can use this trick:

Change the parameters' name from lower case to uppercase, then recompile.

All the charts' parameters will adopt the new values.
OK, that is my preference as well. The issues are with cases 2) to 4).
by cnbiz850
07 Nov 2012
Forum: MultiCharts
Topic: input parameter preservation mishandling [SOLVED]
Replies: 4
Views: 1696

input parameter preservation mishandling [SOLVED]

I am using version 7.4. A few different ways of handling cause some headache. 1) After the recompile of the code (even with a change of the default parameter values), the parameters of the indicator or signal on the chart remain the same as before. This perhaps is not a big deal and can be accepted....
by cnbiz850
06 Nov 2012
Forum: MultiCharts
Topic: Currentbar on Indicator doesnt match currentbar on series [SOLVED]
Replies: 14
Views: 2886

Re: Currentbar on Indicator doesnt match currentbar on serie [SOLVED]

That is not a bug, that is expected behavior. Please see JoshM above post for explanation. Well, this might be an expected behavior with the description, but it is certainly not intuitive and not user friendly. Why can't MaxBarsBack be figured in currentbar in the code so that currentbar indicates ...
by cnbiz850
06 Nov 2012
Forum: MultiCharts
Topic: Currentbar on Indicator doesnt match currentbar on series [SOLVED]
Replies: 14
Views: 2886

Re: Currentbar on Indicator doesnt match currentbar on serie [SOLVED]

If I recall correctly:

Code: Select all

Bar number of chart = MaxBarsBack + CurrentBar - 1
Version 7.4 has this problem, too. This makes the code and the chart not to match each other and makes debugging much harder. I hope this can be taken as a bug.
by cnbiz850
23 Oct 2012
Forum: MultiCharts
Topic: access of data2 affects the calculation on data1
Replies: 2
Views: 1041

Re: access of data2 affects the calculation on data1

Henry,

Thanks for the reply. I hope the matter can get quickly resolved. As it stands, the multiple timeframe feature falls short of expectations.
by cnbiz850
19 Oct 2012
Forum: MultiCharts
Topic: access of data2 affects the calculation on data1
Replies: 2
Views: 1041

access of data2 affects the calculation on data1

My data1 is 1-minute bars since 1/4/2011, data2 is daily bars also since 1/4/2011. When the code is as follows, it plots the indicator nicely. Inputs: NL(500); vars: MidPS(0); MidPS = AverageFC((h+l)/2, NL); plot1(MidPS, "MidPS"); But when I added some calculation on data2, it has problems. Inputs: ...

Go to advanced search