Search found 17 matches

by Squib
13 Jan 2012
Forum: MultiCharts
Topic: Buytocover not working properly
Replies: 15
Views: 3426

Re: Buytocover not working properly

Could it be, that you only allow one trade per bar?
by Squib
10 Jan 2012
Forum: MultiCharts
Topic: how to reference the previous bar when IOG is enabled?
Replies: 11
Views: 3773

Re: how to reference the previous bar when IOG is enabled?

Please correct me if I am wrong. AFAIK MovAvg[1] is always the previous bar and not the previous tick. It doesnt matter if IOG is active when variables are not intrabarpersist. All variables (at the begining of the loop) are set to back to the value of the last close point of the last bar and not o...
by Squib
08 Jan 2012
Forum: MultiCharts
Topic: Optimization: Error in study
Replies: 1
Views: 811

Optimization: Error in study

Hello, I finished my first study and it works without errors. However, when I want to run an optimization, I get an error, which says: Message: Error in study "name of the study" :: Schwerwiegender Fehler Last two words are German an mean: Serious Error. Also after I limited the number of parameters...
by Squib
02 Jan 2012
Forum: MultiCharts
Topic: Strange compile error
Replies: 3
Views: 1446

Re: Strange compile error

actually it should read: Keyword "Sell" can't been used in this type of study This would make more sense. If I disable the line with the "sell"-instruction, the error disappears. But why isn't it possible to code a function, which checks a take-profit and in case it is reached, closes the open long...
by Squib
02 Jan 2012
Forum: MultiCharts
Topic: Strange compile error
Replies: 3
Views: 1446

Strange compile error

Again a question... When I try to compile this simple function... input: PositionTP(NumericSimple), PositionSize(NumericSimple); if close >=PositionTP and PositionSize>0 then begin sell PositionSize contracts next bar at market; end; ...I get following strange compiler error: 02.01.12 23:15:59 -----...
by Squib
02 Jan 2012
Forum: MultiCharts
Topic: GetAccountID()
Replies: 4
Views: 1733

Re: GetAccountID()

Hm, that should work. According to the help:
Does it work when you have auto-trading on and a strategy applied to the chart?
Thanks a lot Josh,
that was exactly the point.
After enabling auto-trading the instruction works.
AutomateOrderExecution.jpg
(114.38 KiB) Downloaded 528 times
by Squib
01 Jan 2012
Forum: MultiCharts
Topic: GetAccountID()
Replies: 4
Views: 1733

GetAccountID()

Does the instruction "GetAccountID()" work? I found an old thread, where it was mentioned, that this function will be implemented in MC5.
With following code in a study the value of AccountID stays empty.

Code: Select all

variables:
AccountID("");

AccountID=GetAccountID();
Print("AccountID:",AccountID);
by Squib
26 Dec 2011
Forum: MultiCharts
Topic: Minimum Lot Step
Replies: 2
Views: 1062

Minimum Lot Step

For different underlyings I can have a different value for the minimum lot-size/lot-step, which I must trade. For example for MBT on EURUSD I have a minimum lot size of 0.01 lot. Simple question: Is there a way to find out about this broker/underlying specific value with a power language instruction...
by Squib
14 Dec 2011
Forum: MultiCharts
Topic: currentbar and MaxBarsBack
Replies: 7
Views: 2058

Re: currentbar and MaxBarsBack

Meanwhile I found the answer by myself (with help from another forum). Problem is, that my understanding of MaxBarsBack was wrong. It does not only determine the bar on which currentbar starts to count with 1, but also limits the number of bars, which can be accessed backwards. So the code in my exa...
by Squib
11 Dec 2011
Forum: MultiCharts
Topic: currentbar and MaxBarsBack
Replies: 7
Views: 2058

Re: currentbar and MaxBarsBack

Hi Roman, thanks for helping, but changing the code in this way changes the functionality. What I want to do is following (just as test-example). At every bar I want to plot the maximum value from the very left side of the chart until the current bar. According to my undestanding, following code sho...
by Squib
08 Dec 2011
Forum: MultiCharts
Topic: currentbar and MaxBarsBack
Replies: 7
Views: 2058

Re: currentbar and MaxBarsBack

Btw. Have you tried removing the indicator and re-adding it to the chart? (Since changes in the MaxBarsBack setting only seem to come in effect after re-adding as far as I know) Btw, looking at your screenshot, I wouldn't be surprised if the same indicator is applied to a minimized chart or set to h...
by Squib
08 Dec 2011
Forum: MultiCharts
Topic: currentbar and MaxBarsBack
Replies: 7
Views: 2058

Re: currentbar and MaxBarsBack

Hi Josh, thanks for your help! I don't know, it runs correctly here (MC7.0) with an indicator with a user specified MaxBarsBack of 20: Yes, with a simple indicator, currentbar and MaxBarsBack works like expected at my version (7.4 beta 2). Quite sure I'm doing something wrong here. Here is the rathe...
by Squib
06 Dec 2011
Forum: MultiCharts
Topic: currentbar and MaxBarsBack
Replies: 7
Views: 2058

currentbar and MaxBarsBack

Hi, my understanding of MaxBarsBack is, that it is fix for a study, once I have set a value in the "Format Study" dialog. Now I'm debugging an Indicator and I discovered followig behaviour: At the beginning of the code I placed a debug print instruction Print("CB: ",currentbar," MB: ", MaxBarsBack);...
by Squib
02 Dec 2011
Forum: MultiCharts
Topic: Calling compiler from external editor
Replies: 8
Views: 2241

Re: Calling compiler from external editor

is it possible to call the MC-compiler from an external editor and if yes, which exe needs to be used?
You mean for debugging purposes Squib?
No, not for debugging. Just for writing and compiling code.
by Squib
02 Dec 2011
Forum: MultiCharts
Topic: Calling compiler from external editor
Replies: 8
Views: 2241

Re: Calling compiler from external editor

Hi, Please describe what you are trying to do and what is your final goal. Hi, I want to use UltraeditStudio as an alternative editor. It is more comfortable then the built in MC editor. Final goal would be to be able to compile my studies out of UE. I can configure this editor in a way, that it ca...
by Squib
01 Dec 2011
Forum: MultiCharts
Topic: Calling compiler from external editor
Replies: 8
Views: 2241

Calling compiler from external editor

Hi,

is it possible to call the MC-compiler from an external editor and if yes, which exe needs to be used?

Thanks!
by Squib
29 Nov 2011
Forum: MultiCharts
Topic: plot linestyle
Replies: 1
Views: 899

plot linestyle

Hi,

is it possible to set the line style of a plot by the indicator code?
I know, I can modify it by the indicator-style window, but it's quite an effort if I have to modify 5 lines of an indicator manually, everytime I apply it to a chart.

Thanks!

Go to advanced search