Search found 91 matches

by kernel
07 Jan 2017
Forum: MultiCharts
Topic: IOG strategy optimization
Replies: 3
Views: 1467

IOG strategy optimization

Hi,

My strategy is written in IOG code, that is, calculation is performed on each incoming tick, is it possible or practical to optimize IOG-code based strategy like that? Any particular settings or considerations need to be taken care of? Thanks.

-kernel
by kernel
24 Sep 2016
Forum: MultiCharts
Topic: tl_new, text_new return values owned by others
Replies: 3
Views: 1587

Re: tl_new, text_new return values owned by others

Josh,

Thanks for the reply. the 2nd one was meant to be "text_new"...a typo, sorry.
by kernel
08 Sep 2016
Forum: MultiCharts
Topic: tl_new, text_new return values owned by others
Replies: 3
Views: 1587

tl_new, text_new return values owned by others

Hi, I found that tl_new and text_new return values owned by others, as the consequence of that, tl_delete deletes the wrong object. Normally, handles returned by some creation function are "random" numbers, not positive integers as in MC, to maintain its uniqueness and avoid the aforementioned confl...
by kernel
06 Aug 2016
Forum: MultiCharts
Topic: reuse Trailing Stop (TS) while holding a position
Replies: 5
Views: 2008

Re: reuse Trailing Stop (TS) while holding a position

Ben, Sorry I failed to make it clear that this trailing stop mechanism is intended to be reused while holding a position. When market falls to a certain amount, the TS.S is set. If it triggers, only PARTIAL position exits. After that, TS.S is set to 999999 (reset). If certain market condition meets,...
by kernel
05 Aug 2016
Forum: MultiCharts
Topic: reuse Trailing Stop (TS) while holding a position
Replies: 5
Views: 2008

Re: reuse Trailing Stop (TS)

Ben, Like I said in my first post, I'd like to be able to reuse this trailing stop mechanism, the boolean variable serves as a toggle and monitors if the trailing stop has been hit. Since the "KKKK" gets printed, the "buytocover" line has been executed for sure. But for some reason, no contract is s...
by kernel
04 Aug 2016
Forum: MultiCharts
Topic: reuse Trailing Stop (TS) while holding a position
Replies: 5
Views: 2008

reuse Trailing Stop (TS) while holding a position

Hi, I'd like to reuse trailing stop (TS) mechanism in my code as demonstrated in the following pseudo-code. The code shows only the short part. TS.S refers to Trailing Stop (price) for Short. However, the trailing stop works just fine only for the first time it gets hit from below. As market keeps f...
by kernel
14 Jan 2016
Forum: MultiCharts
Topic: detect if market is live or not [SOLVED]
Replies: 3
Views: 1467

Re: detect if market is live or not [SOLVED]

Josh and Henry,

Thank you guys for your replies. They both are very helpful.

-kernel
by kernel
12 Jan 2016
Forum: MultiCharts
Topic: detect if market is live or not [SOLVED]
Replies: 3
Views: 1467

detect if market is live or not [SOLVED]

Hi,

To detect if a particular market is live or not for this moment, what I can think of is to compare current time with its session time. But is there other better approaches?....some magic reserved word I may resort to and overlooked? :-) thanks.

-kernel
by kernel
12 Jan 2016
Forum: MultiCharts
Topic: use GVSetNamedXXX/GVGetNamedXXX to broadcast symbolroot
Replies: 1
Views: 840

use GVSetNamedXXX/GVGetNamedXXX to broadcast symbolroot

Hi, I tried to use GVSetNamedXXX/GVGetNamedXXX pair to broadcast symbol names but failed. My guess is probably due to the type conversion, any good ideas on how to broadcast instrument names? if each instrument has an unique ID, it'd be lot easier. GVSetNamedDouble(symbolroot, StrToNum(symbolroot));...
by kernel
12 Jan 2016
Forum: MultiCharts
Topic: dynamic 2D array
Replies: 1
Views: 2134

dynamic 2D array

Hi, Wonder would MC team consider adding dynamic 2D array alongside with its existing 1D sibling? If it's already exist, excuse me for my ignorance then. For example: 2DArrays: my2DArray1[ , ], my2DArray2[ , 2]; 2DArray_setmaxrows(my2DArray1, 10); 2DArray_setmaxcolumns(my2DArray1, 15); 2DArray_setma...
by kernel
10 Jan 2016
Forum: MultiCharts
Topic: synchronization issues using GVsetXX/GVgetXX pair w/ IOG on
Replies: 5
Views: 2428

Re: synchronization issues using GVsetXX/GVgetXX pair w/ IOG

TJ, Thanks for the reminding. The Realtime-History Matching option is enabled by default and I leave it that way. You may try this piece of testing script on your machine and see if your result differs. I replaced "if BarNumber<>BN then begin" with "if barstatus=0 then begin", didn't help. Do you ha...
by kernel
10 Jan 2016
Forum: MultiCharts
Topic: synchronization issues using GVsetXX/GVgetXX pair w/ IOG on
Replies: 5
Views: 2428

Re: synchronization issues using GVsetXX/GVgetXX pair w/ IOG

TJ, thanks for reminding. here's the testing script. 1. you need to type in six instrument symbols in the code to replace XXXX 2. load this on six 5m charts with different instruments, set "receiver" to true for one, and false for the remaining five. 3. playback all 6 charts altogether to test on a ...
by kernel
10 Jan 2016
Forum: MultiCharts
Topic: synchronization issues using GVsetXX/GVgetXX pair w/ IOG on
Replies: 5
Views: 2428

synchronization issues using GVsetXX/GVgetXX pair w/ IOG on

Hi, I found some synchronization issues when using GVSetNamedInt/GVGetNamedInt pair from time to time. For example, I have several 5m charts (on 5 different windows) with different instruments. On each bar close (my script is IOG=true though), each chart broadcasts its C[1]-O[1] value, while collect...
by kernel
06 Jan 2016
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

Re: print to file in v8.8

Henry,

printing to output tab works fine.
by kernel
06 Jan 2016
Forum: MultiCharts
Topic: pop-up text alert in strategy [SOLVED]
Replies: 2
Views: 2730

Re: pop-up text alert in strategy [SOLVED]

Josh,

It reads "Note: The Alert reserved word cannot be used in a strategy." in my old EL documentation, so I just took the words w/o testing. My mistake, sorry. Seems MC improved this in later versions. Thank you Josh for reminding.
by kernel
05 Jan 2016
Forum: MultiCharts
Topic: pop-up text alert in strategy [SOLVED]
Replies: 2
Views: 2730

pop-up text alert in strategy [SOLVED]

Hi, I'd like to use pop-up text alert message in my strategy. The strategy is in a dozen charts of different instruments. The "Alert" reserved word cannot be used in a strategy. The "commentary" doesn't seems to fit either, since you have to click on the particular chart to see if there's any text o...
by kernel
01 Jan 2016
Forum: MultiCharts
Topic: Is linked-list available in Easy/Power Language?
Replies: 2
Views: 2368

Is linked-list available in Easy/Power Language?

Hi,

Wonder if other data structures than array, in particular, linked-list, is available in Easy/Power Language? If not, any plan of implementing it in the near future?

In many situations, that'd be much more convenient for handling HLCO data and other trading data in general than arrays.

-kernel
by kernel
30 Dec 2015
Forum: MultiCharts
Topic: GVSetNamedInt with window/chart ID info
Replies: 9
Views: 4466

Re: GVSetNamedInt with window/chart ID info

JoshM, I looked GetAppInfo(aiAppId) the other day, scanned through the available returns to see if I could find something unique to the chart window. My eyes paused for a second or two on the phrase "an unique non-zero integer identifying the calling application"....I guess I wasn't sure what "the c...
by kernel
30 Dec 2015
Forum: MultiCharts
Topic: GVSetNamedInt with window/chart ID info
Replies: 9
Views: 4466

Re: GVSetNamedInt with window/chart ID info

janus, I put a 0/1 padding to the broadcast message yesterday to differentiate the two instances with the same instrument and TF, just like you said you'd do. That provides a temporary fix for now. For the long haul, if you have more than a dozen of chart windows spreading over different instruments...
by kernel
29 Dec 2015
Forum: MultiCharts
Topic: GVSetNamedInt with window/chart ID info
Replies: 9
Views: 4466

Re: GVSetNamedInt with window/chart ID info

Janus, Thank you for your reply. That's exactly what I did. By incorporating symbol name and time frame into the broadcast message. How ever, if I have two charts/windows with the same instrument and TF, I need to incorporate more info to be able to tell them apart. This piece of info needs to be un...
by kernel
28 Dec 2015
Forum: MultiCharts
Topic: GVSetNamedInt with window/chart ID info
Replies: 9
Views: 4466

GVSetNamedInt with window/chart ID info

Hi, When using GVSetNamedInt to communicate, is there any way that you also explicitly include the window/chart ID of the sender? With that info attached, the receiver may be able to tell who the sender is even if you have multiple windows/charts that contain the same instrument and time frame. Than...
by kernel
20 Dec 2015
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

Re: print to file in v8.8

Josh,

Thank you so much for your time and effort.

I still do not have clue what causes the problem, but at least I know what does NOT, based on your feedback...thank you.
by kernel
20 Dec 2015
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

Re: print to file in v8.8

TJ and Josh, Thank you both for your thoughts. I also suspected so but no clue has been found yet. Per Josh's suggestion, I turned off virus scanner and ran MC as administrator but nothing changed. I double checked the attribute of the target folder MC wrote to in Win7 setting, write permission was ...
by kernel
19 Dec 2015
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

Re: print to file in v8.8

sptrader,

Thanks for the reply. Just tried it with IOG off, but it didn't do the trick, no luck.
Try this one:

for value1 = 0 to 10 begin
FileAppend("c:\test1.txt", NumToStr(value1,0));
end;
by kernel
19 Dec 2015
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

Re: print to file in v8.8

TJ, Nothing changed with the following code. Also, the directory is NOT write protected. Like I mentioned, it used to work properly with older MC versions and under WinXP. With v8.8 and Win7, there are two variables involved here and not sure which causes the problem or simply something I missed? [I...
by kernel
19 Dec 2015
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

Re: print to file in v8.8

TJ,

The directory is not write protected. However, nothing gets written there. No file is created. If I manually created the test1.txt file, nothing gets written in it.
by kernel
18 Dec 2015
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

Re: print to file in v8.8

Hi Josh, Just did a quick test with the following code, but nothing happened. According to its description, FileAppend is supposed to created the file if it's not already exist, however, it failed to do so. I manually created a txt file, test1.txt, still, nothing gets written into it. any clue? Like...
by kernel
18 Dec 2015
Forum: MultiCharts
Topic: print to file in v8.8
Replies: 16
Views: 5980

print to file in v8.8

Hi, Is there any way to print to file in v8.8 and under win7? I used to use print-to-file feature a lot back in older version and in winXP but unable to do so in v8.8 under win7. Sometimes MC places orders during live market when conditions are not met, neither am I able to repeat it in replay mode....
by kernel
21 Nov 2015
Forum: MultiCharts
Topic: [IOG] how to make a limit order remain active if not filled [SOLVED]
Replies: 5
Views: 2836

Re: how to make a limit order remain active [SOLVED]

Taking the following code snippet as example, my confusion lies in how long the life expectancy of an order is after being placed? (1) it will be on your broker's server and active throughout next tick (IOG=true) or bar(IOG=false), but if it is not filled throughout next tick/bar or your position cl...
by kernel
21 Nov 2015
Forum: MultiCharts
Topic: [IOG] how to make a limit order remain active if not filled [SOLVED]
Replies: 5
Views: 2836

Re: how to make a limit order remain active [SOLVED]

Tony, I guess I'm confused by how MC behaves now. Let's say you write the stop loss and profit target like this: [IntrabarOrderGeneration = TRUE] // ..........// if(marketPosition = 1) then begin Sell ("longLoss")next bar at longProtStop stop; Sell ("longProfit")next bar at longProfitStop limit; end...
by kernel
20 Nov 2015
Forum: MultiCharts
Topic: [IOG] how to make a limit order remain active if not filled [SOLVED]
Replies: 5
Views: 2836

[IOG] how to make a limit order remain active if not filled [SOLVED]

Hi, A limit order remains active throughout the next bar or tick (if IOG on) until filled or canceled. Wonder how I can change this default behavior and not to have it canceled if not filled throughout the next bar or tick? Would it be automatically canceled if my position goes flat without it being...
by kernel
20 Nov 2015
Forum: MultiCharts
Topic: Tying entries with its contracts
Replies: 2
Views: 1406

Re: Tying entries with its contracts

Here's a code snippet from EL_essential book under "Tying Entry and Exit". Problem is, assuming entry orders were placed not by market orders, or even by market orders in IOG code, it's possible not all 200 shares or 100 shares were filled on "next tick". In this case, you need to know how many are ...
by kernel
20 Nov 2015
Forum: MultiCharts
Topic: Tying entries with its contracts
Replies: 2
Views: 1406

Tying entries with its contracts

Hi, Let's say, you have two long entries, LE1 and LE2, together they established an open position of 10 contracts total (some of the orders they placed may not be filled). Is there any way to know how many contracts were by LE1 and how many were by LE2 at any time? In this case, "entryname" seems to...
by kernel
19 Nov 2015
Forum: MultiCharts
Topic: confirmation of filled order from the broker [SOLVED]
Replies: 2
Views: 1530

confirmation of filled order from the broker [SOLVED]

Hi, Wonder if there's a way to retrieve the confirmation info from your broker that your order gets filled? One way workaround that I can think of is to monitor my position change in code. However, market is unpredictable , plus the complexity of your code on handling stop loss, profit target, scale...
by kernel
17 Nov 2015
Forum: MultiCharts
Topic: instantaneously detecting position change in IOG code [SOLVED]
Replies: 4
Views: 1896

Re: instantaneously detecting position change in IOG code [SOLVED]

Hi Tony, Basically I'm trying to find means of being able to detect my currentcontracts change instantaneously and act accordingly w/o waiting for another bar to print on chart. This variable-assignment approach works fine when IOG=false but does not work in IOG=true code, because the variable won't...
by kernel
17 Nov 2015
Forum: MultiCharts
Topic: instantaneously detecting position change in IOG code [SOLVED]
Replies: 4
Views: 1896

instantaneously detecting position change in IOG code [SOLVED]

Hi, I tried to use "currentcontracts" to detect open position change (currentcontracts change) in my IOG code but failed. The reason is, in IOG code, even you assign currentcontracts to some variable, say, CC, the assigned variable will not change until a new bar prints on chart...is there any way t...
by kernel
12 Oct 2015
Forum: MultiCharts
Topic: possible to close open position at any time on a 5m chart?
Replies: 14
Views: 3957

Re: possible to close open position at any time on a 5m char

* How about this option, use a single 1 minute chart and make a simulated 5 minute chart out of it for your other calcs- A "simulated" 5 minute chart would be: open = open[5], high = highest(h,5) Low = lowest(L,5), and C[0].... just a thought. I trade 5m chart, all computations are based on 5m char...
by kernel
12 Oct 2015
Forum: MultiCharts
Topic: possible to close open position at any time on a 5m chart?
Replies: 14
Views: 3957

Re: possible to close open position at any time on a 5m char

Your likely options are either to use data2 or reference computerdatetime which will give you the resolution of 1 minute. There are likely other solutions but without researching these are the two that come to mind. I agree with you. Both are likely to be working. However, one lacks elegance, the o...
by kernel
11 Oct 2015
Forum: MultiCharts
Topic: possible to close open position at any time on a 5m chart?
Replies: 14
Views: 3957

Re: possible to close open position at any time on a 5m char

************************************************************************ * Don't worry about screen real-estate- just make the Data2 1 min bars- "hidden"... or use IOG, that should work too. (as SP suggested above) How do you make a chart "hidden" btw? I'd leave that as the last ditch though. kernel
by kernel
11 Oct 2015
Forum: MultiCharts
Topic: possible to close open position at any time on a 5m chart?
Replies: 14
Views: 3957

Re: possible to close open position at any time on a 5m char

You need to use [IntrabarOrderGeneration = true] at your code. Then "next bar" is "next tick" if the condition is true and there is a tick/trade at the 1021 bar. After inserting the code go to Format->Properties->Check "Enable Intra-Bar Order Generation" and check under Exits "Allow any exits from ...
by kernel
11 Oct 2015
Forum: MultiCharts
Topic: possible to close open position at any time on a 5m chart?
Replies: 14
Views: 3957

Re: possible to close open position at any time on a 5m char

You could try the reserve word computerdatetime which may work, but again I haven't tried it in your situation. I haven't got a chance to test it yet, but it seems to return my local computer time, right? That'd put a lot of stress on my local time accuracy if you really don't want to hold your pos...
by kernel
11 Oct 2015
Forum: MultiCharts
Topic: possible to close open position at any time on a 5m chart?
Replies: 14
Views: 3957

Re: possible to close open position at any time on a 5m char

Tony, Thanks for the input. That solution was also the first alternative that came across my mind, which should work. However, to a trader, screen is a limited resource. That being said, loading a 1m chart just as a timer is not an elegant solution to me. I'm trying to stay within a single 5m chart....
by kernel
10 Oct 2015
Forum: MultiCharts
Topic: possible to close open position at any time on a 5m chart?
Replies: 14
Views: 3957

possible to close open position at any time on a 5m chart?

Hi, I'd like to know if it's possible to close an open position at anytime (not a multiple of 5) on a 5m chart? if time=1021 then begin if MP=1 then sell next bar at market; if MP=-1 then buytocover next bar at market; end; this won't work, since 21 is not multiple of the time interval, i.e., 5m. Ba...
by kernel
20 Apr 2015
Forum: MultiCharts
Topic: ADE, Ecollection
Replies: 1
Views: 1114

ADE, Ecollection

Hi,

Heard a bit about them. What are they? What do they do? What's good/bad about them? How can I make use of them in my strategy implementation?.....Can someone please kindly provide some links?

-K
by kernel
20 Apr 2015
Forum: MultiCharts
Topic: Found a bar that has a Text box attached to it: Possible?
Replies: 6
Views: 2543

Re: Found a bar that has a Text box attached to it: Possibl

Hi Martin,

Try Text_getactive and Text_GetBarNumber.

Code: Select all


print(" bar#=", text_getbarnumber(text_getactive()));
cheers,

-K
by kernel
20 Apr 2015
Forum: MultiCharts
Topic: TL_new, TL_delete, TL_lock
Replies: 8
Views: 3310

Re: TL_new, TL_delete, TL_lock

Hi ABC, I agree with you on that, updating the trendline (horizontal line in my case) tick by tick is the better way to go. I did exactly that at first with tl_setbegin/tl_setend pair, but encountered similar problem. Back then I wasn't aware of the root cause of the problem, so I tried a different ...
by kernel
19 Apr 2015
Forum: MultiCharts
Topic: TL_new, TL_delete, TL_lock
Replies: 8
Views: 3310

Re: TL_new, TL_delete, TL_lock

The problem is in your code. I can say that because the problem you described is a simple one, if it were a bug, it would have been discovered long ago. Thousands of people uses drawing objects everyday with no problem. I would recommend you to review your codes again line by line, and to reduce co...
by kernel
19 Apr 2015
Forum: MultiCharts
Topic: TL_new, TL_delete, TL_lock
Replies: 8
Views: 3310

Re: TL_new, TL_delete, TL_lock

it turned out to be that, this part of the code works fine. However, the tl_new() function returns some value that already exist returned by other tl_new() function call. So it boils down to the question: Does tl_new() guarantee to return a UNIQUE value every time it gets called? If not, then proble...
by kernel
19 Apr 2015
Forum: MultiCharts
Topic: TL_new, TL_delete, TL_lock
Replies: 8
Views: 3310

TL_new, TL_delete, TL_lock

Hi, I have problem dealing with the set of TL_XXX functions. I'd like to update a horizontal line tick by tick (with IntrabarOrderGeneration ON), with code snippet as follows: [IntrabarOrderGeneration = TRUE] if TL_Exist(value1) then tl_delete(value1); value1=tl_new(d,t,H,d,t,H); tl_setextright(valu...
by kernel
17 Apr 2015
Forum: MultiCharts
Topic: MarketPosition=2? [SOLVED]
Replies: 2
Views: 1632

MarketPosition=2? [SOLVED]

Isn't it true that MarketPosition returns only 1, indicating long, -1, indicating short, or 0, indicting flat? wiki: https://www.multicharts.com/trading-software/index.php/MarketPosition What does it mean by MarketPosition returning 2 as in the following example then? https://www.multicharts.com/tra...
by kernel
17 Apr 2015
Forum: MultiCharts
Topic: function returning ticks per bar?
Replies: 1
Views: 1119

function returning ticks per bar?

Hi,

Wonder if there is any function that returns ticks (trades) per bar (or per certain period of time such as a minute), so a speedy market can be told apart from a slow market....or any other function or built-in indicator for that purpose? thanks.

-K
by kernel
10 Apr 2015
Forum: MultiCharts
Topic: improvement suggestion: multiple charts
Replies: 5
Views: 1942

Re: improvement suggestion: multiple charts

kernel, Erik Pepping,

Please disable the option "Tracking Time and Price" under View tab->Tracking Settings.
This is not what I want. I'd like to have all the time frames to move simultaneously while the price action being able to stay on focus within its containing window.
by kernel
10 Apr 2015
Forum: MultiCharts
Topic: auto-detect current position, possible? [SOLVED]
Replies: 1
Views: 1145

auto-detect current position, possible? [SOLVED]

Hi, Instead of full auto-trading, what I'd like to do is "partial" automation: I be in charge of decision-making on when and where to enter the market, and let my computer take over the rest and finish the job (position management and exit). However, to achieve that, you'd have to tell MC your posit...
by kernel
26 Mar 2015
Forum: MultiCharts
Topic: barssinceexit() for multiple contracts scaling out [SOLVED]
Replies: 1
Views: 1074

barssinceexit() for multiple contracts scaling out [SOLVED]

Hi, If you have 2 contracts and scale them out, is there any function like barssinceexit() that returns the number of bars ago at which the "1st contract" being scaled out? barssinceexit(1) doesn't work under this circumstance, your position has to be flat first before it may return anything. Thanks...
by kernel
15 Mar 2015
Forum: MultiCharts
Topic: scope of value1, value2, etc. and condition1, condition2,etc [SOLVED]
Replies: 1
Views: 1426

scope of value1, value2, etc. and condition1, condition2,etc [SOLVED]

What's the scope of these predefined variables? file? global?
by kernel
11 Mar 2015
Forum: MultiCharts
Topic: multiple time frame backtesting
Replies: 6
Views: 2579

Re: multiple time frame backtesting

I do reference data series like "if close > var1 of Data2" and I am using IOG mode. Perhaps a moderator will highlight something I am missing. But I did spend a bit of time over a year ago understanding this issue as it relates to back testing. And I believe it's a limitation. And again, it may be ...
by kernel
11 Mar 2015
Forum: MultiCharts
Topic: multiple time frame backtesting
Replies: 6
Views: 2579

Re: multiple time frame backtesting

I have 3 charts in my WS. The first is Data1, the second Data2, third Data3. Each has a different bar duration (20, 5, 1). So I believe I am doing what you are asking. I don't have 3 data series in one chart, not sure that can be done or not. But side tracking. Do you access other data series by qu...
by kernel
11 Mar 2015
Forum: MultiCharts
Topic: multiple time frame backtesting
Replies: 6
Views: 2579

Re: multiple time frame backtesting

If you are backtesting on multiple data series (multiple being greater than 1) I believe it won't work properly. It's a limitation of MC. I signal off Data1 and use Data2 and Data3 as part of my conditionals for a signal, but in backtesting, it will not function properly. It works perfectly fine in...
by kernel
11 Mar 2015
Forum: MultiCharts
Topic: improvement suggestion: multiple charts
Replies: 5
Views: 1942

improvement suggestion: multiple charts

When you have multiple charts on display and click on one of them, prices in other charts may go out of range. It'd be nice to see, no matter where in any of the charts you click, all the prices in all other charts stay in range.
by kernel
11 Mar 2015
Forum: MultiCharts
Topic: multiple time frame backtesting
Replies: 6
Views: 2579

multiple time frame backtesting

I tried to get a backtest on multiple time frame to work but failed. The idea was pretty straightforward as follows: 1m script is a signal script, keeping monitoring message sent by the 5m script, which is an indicator and sends a message to global space via GVsetNamedInt/GVgetNamedInt function pair...
by kernel
10 Mar 2015
Forum: MultiCharts
Topic: SetProfitTarget allows partial position liquidation?
Replies: 1
Views: 1047

SetProfitTarget allows partial position liquidation?

hi,

Wonder if the function SetProfitTarget has any sibling function that allows partial position liquidation, saying with some parameter indicating how many shares or contracts (or a percentage of your position) to exit with? thanks.

-K
by kernel
10 Mar 2015
Forum: MultiCharts
Topic: Inconsistent HighestBar returns with IntraBarOrderGeneration
Replies: 3
Views: 1416

Re: Inconsistent HighestBar returns with IntraBarOrderGenera

Where did you get this definition?

Can you give a link?

This can be verified by the column "close" in the output.
by kernel
10 Mar 2015
Forum: MultiCharts
Topic: Inconsistent HighestBar returns with IntraBarOrderGeneration
Replies: 3
Views: 1416

Inconsistent HighestBar returns with IntraBarOrderGeneration

test script: [IntraBarOrderGeneration = TRUE] vars: BullBody(-1); BullBody=C-O; print("time:", time, "close:", close, " Highest(C-O,50):", Highest(C-O,50), " Highest(BullBody)", Highest(BullBody,50), " diff:", Highest(C-O,50)-Highest(BullBody,50)); print("time:", time, "close:", close, " Highestbar(...
by kernel
09 Mar 2015
Forum: MultiCharts
Topic: GVSetNamedInt, GVGetNamedInt
Replies: 6
Views: 1968

Re: GVSetNamedInt, GVGetNamedInt

You can study my code for a quick start

GlobalVariables GV Latency Tester
viewtopic.php?f=5&t=10780
already did, appreciated, but still couldn't figure out.
by kernel
09 Mar 2015
Forum: MultiCharts
Topic: GVSetNamedInt, GVGetNamedInt
Replies: 6
Views: 1968

Re: GVSetNamedInt, GVGetNamedInt

then I added one line in the 30m script to have its data "dat30" incremented on each run: [IntraBarOrderGeneration = TRUE] vars: dat30(30); dat30=dat30+1; //send GVSetNamedInt("d30",dat30); //recieve print("30m: d1=", GVGetNamedInt("d1",-999), " dat30=", dat30); 5m and 1m scripts were same as before...
by kernel
09 Mar 2015
Forum: MultiCharts
Topic: GVSetNamedInt, GVGetNamedInt
Replies: 6
Views: 1968

Re: GVSetNamedInt, GVGetNamedInt

ran a quick test as follows: 30m (indicator, sender/receiver) script: [IntraBarOrderGeneration = TRUE] vars: dat30(30); //send GVSetNamedInt("d30",dat30); //recieve print("30m: d1=", GVGetNamedInt("d1",-999), " dat30=", dat30); 5m (indicator, sender/receiver) script: [IntraBarOrderGeneration = TRUE]...
by kernel
09 Mar 2015
Forum: MultiCharts
Topic: GVSetNamedInt, GVGetNamedInt
Replies: 6
Views: 1968

Re: GVSetNamedInt, GVGetNamedInt

They should work in either direction. Were both scripts updating continously, either by checking the option 'update on every tick' (for indicators) or with RecalcLastBarAfter ? When, for example, both scripts are calculated on bar close only, the 1m sender would submit five `GVSetNamedInt` updates ...
by kernel
08 Mar 2015
Forum: MultiCharts
Topic: GVSetNamedInt, GVGetNamedInt
Replies: 6
Views: 1968

GVSetNamedInt, GVGetNamedInt

Hi, When GVSetNamedInt and GVGetNamedInt were used to pass values from low resolution time frame to high resolution time frame, saying, 5m as the sender and 1m as the receiver, it worked fine. However, I couldn't get it work on the reverse direction, i.e., 1m as the sender, 5m as the receiver. Were ...
by kernel
08 Mar 2015
Forum: MultiCharts
Topic: how to get the time frame value [SOLVED]
Replies: 1
Views: 1304

how to get the time frame value [SOLVED]

hi, I use barinterval to get the time frame value. However, barinterval can only be applied to intraday charts, not daily chart. When applied to a daily chart, it returns 1, the same as applied to a 1m chart. How can I tell a daily chart from a 1m chart then? any other functions to get the time fram...
by kernel
01 Mar 2014
Forum: MultiCharts
Topic: suggest: quick instrument selection in DOM window
Replies: 1
Views: 890

suggest: quick instrument selection in DOM window

Hi, It's a great pleasure to see many new features and improvements in the newly released MC8...great work, keep it up MC team! It's nice to see the newly implemented DOM window, it seems everything imaginable is there but one...however, this missing one made me have to give up on relying DOM for it...
by kernel
02 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Re: Dealing with multiple positions of the same instrument i

If I understand correctly, a wash trade is a simultaneous buy a sell. What about if on Monday I go long MSFT and on Thursday I go short and I want to keep both trades in different accounts? Is that illegal? Potentially I can profit from both trades depending on price changes. or, for day-traders, l...
by kernel
02 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Re: Dealing with multiple positions of the same instrument i

Please start here: https://www.multicharts.com/discussion/viewtopic.php?f=16&t=10811 please look for the article: Trading from Multiple Charts on One Instrument TJ, The technical issues were raised here after they've been fully investigated and (re)searched in the EL language manual/guide, i.e. the...
by kernel
01 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Re: Dealing with multiple positions of the same instrument i

setstoploss and setdollartrailing are Global orders . see post #5 https://www.multicharts.com/discussion/viewtopic.php?f=16&t=10811 If you wish to manage your orders individually, you have to code the step-by-step logic yourself. There is no one-size-fits-all keyword that can fulfill all the possib...
by kernel
01 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Re: Dealing with multiple positions of the same instrument i

Holding a long and a short at the same time is called a ' wash trade ', which is illegal even if you use multiple accounts. For example, it is in violation of CME's trading rules: Very informative, thanks. What if you have two different strategies from two accounts but applied on the same instrumen...
by kernel
01 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Re: Dealing with multiple positions of the same instrument i

You cannot have a long and a short position of the same instrument at the same broker with the same account at the same time. This is sad, it'd be helpful otherwise. How about multiple positions in the same direction then, like in scaling-in and scaling-out, let's say I have two outstanding open lo...
by kernel
01 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Re: Dealing with multiple positions of the same instrument i

My question is, is it possible for functions such as "marketposition", "setstoploss", "setdollartrailing" etc to take an input string argument for different outstanding open positions (in the same or opposite directions) like: marketposition("position#1"); marketposition("position#2"); .... setstopl...
by kernel
01 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Re: Dealing with multiple positions of the same instrument i

TJ, Would you kindly be more specific? which part in the wiki that these specific issues are addressed? I read thru the EL manuals and EL Functions and Reserved Words and wasn't able to find the answer. The online wiki contains pretty much the same material as the EL manual I read, for example, "mar...
by kernel
01 Jun 2013
Forum: MultiCharts
Topic: Dealing with multiple positions of the same instrument in EL
Replies: 17
Views: 6033

Dealing with multiple positions of the same instrument in EL

Hi, Wonder how you'd deal with multiple positions of the same instrument in EasyLanguage. Let's say, you go both long and short on the same instrument with buy("EL") and sellshort("ES"), no problem with that because "buy" and "sellshort" take a string as the entry name so they could be differentiate...
by kernel
25 May 2013
Forum: MultiCharts
Topic: windows-style export/import window
Replies: 5
Views: 2657

Re: windows-style export/import window

Henry,

I'm reading the pm page and figuring out where it fits in.

-k
by kernel
25 May 2013
Forum: MultiCharts
Topic: MC walk forward optimization with GA
Replies: 8
Views: 4975

Re: MC walk forward optimization with GA

Henry, WFE is not one of those criteria in the fitness function based on which the parameters are to be optimized, but rather a critical measure whether or not the historical performace will carry on. It'd be very helpful to leave a column for WFE just like "net profit" or "profit factor" (currently...
by kernel
23 May 2013
Forum: MultiCharts
Topic: windows-style export/import window
Replies: 5
Views: 2657

Re: windows-style export/import window

TJ, Thanks for the echo. The picture you posted shows the file structure in Powerlanguage editor's navigator window. MC currently supports folder operations in that. What I addressed is the same folder operation support in export/import window. In reality, if you feel cumbersome, chances are, you ar...
by kernel
23 May 2013
Forum: MultiCharts
Topic: windows-style export/import window
Replies: 5
Views: 2657

Re: windows-style export/import window

A picture is worth a thousand words, to illustrate the idea, please refer to the screenshots below. In Powerlanguage Editor's navigator window, I have each folder named "mine" under each category, "functions", "indicators", and "signals". http://www.multicharts.com/discussion/download/file.php?id=64...
by kernel
23 May 2013
Forum: MultiCharts
Topic: MC walk forward optimization with GA
Replies: 8
Views: 4975

Re: MC walk forward optimization with GA

Please upgrade your MultiChartsto ver. 8.7 beta 1. Hi Henry, I upgraded to ver8.7beta1 as you suggested, nice to see there were more work done after 7, good job by MC! As far as the WFO module, I consistently ran into errors. The WFO successfully performed the first round of optimization of one par...
by kernel
21 May 2013
Forum: MultiCharts
Topic: windows-style export/import window
Replies: 5
Views: 2657

windows-style export/import window

Hi there, Just exported hundreds of functions/indicators/signals of my own...my eyes were sore and my finger was numb, because I'd like to export just my own instead of all the built-ins that come with MC. To ensure that, you'd have to cherry-pick them one by one. Although I created three folders in...
by kernel
21 May 2013
Forum: MultiCharts
Topic: MC walk forward optimization with GA
Replies: 8
Views: 4975

Re: MC walk forward optimization with GA

Hi Henry, thanks for the prompt reply. Hello Kernel, Which version and build number of MultiCharts do you use ? I would recommend you to update to MultiCharts 8.7 beta 1 and run your tests, this version contains all of the latest WFO improvements/fixes as well as better indication of why optimizatio...
by kernel
21 May 2013
Forum: MultiCharts
Topic: MC walk forward optimization with GA
Replies: 8
Views: 4975

MC walk forward optimization with GA

Hi there, I encountered problem when using MC's walk forward optimization with genetic algorithm. It worked for a while on different securities, then problem occurred when I noticed it took much less time for the same computing load performed before, saying 40 min for 1500 combinations of parameters...
by kernel
22 Feb 2013
Forum: MultiCharts
Topic: How does MC caculate slippage in backtesting? [SOLVED]
Replies: 25
Views: 8409

Re: How does MC caculate slippage in backtesting? [SOLVED]

Hello Kernel, If slippage is set to >0 in Strategy Properties , then it will affect both backtesting and auto-trading (limit orders are not affected by slippage since MC 8.5). And TJ is right, there are multiple factors affecting order execution in backtesting. hi Andrew, Even with slippage set to ...
by kernel
22 Feb 2013
Forum: MultiCharts
Topic: How does MC caculate slippage in backtesting? [SOLVED]
Replies: 25
Views: 8409

Re: How does MC caculate slippage in backtesting? [SOLVED]

hi, I noticed that even with commission fees set to 0 in backtesting, slippage of 0~2 points occurs, more interestingly, it varies each time, but depending on what? or does MC simply randomly set the slippage in backtesting? A lot of factors can a influence the results of your backtesting; your cod...
by kernel
22 Feb 2013
Forum: MultiCharts
Topic: How does MC caculate slippage in backtesting? [SOLVED]
Replies: 25
Views: 8409

How does MC caculate slippage in backtesting? [SOLVED]

hi,

I noticed that even with commission fees set to 0 in backtesting, slippage of 0~2 points occurs, more interestingly, it varies each time, but depending on what? or does MC simply randomly set the slippage in backtesting?
by kernel
20 Feb 2013
Forum: MultiCharts
Topic: different outputs depending on maxbarsback
Replies: 5
Views: 1479

Re: different outputs depending on maxbarsback

TJ and bowlesj3, thank you both for the reply...and the links by TJ, the abnormality occurred a couple of bars right after maxbarsback, i guess this was the cause. Speaking of maxbarsback, if one uses multiple time frames, saying data1 and data2, because both have to meet the maxbackbars requirement...
by kernel
19 Feb 2013
Forum: MultiCharts
Topic: different outputs depending on maxbarsback
Replies: 5
Views: 1479

different outputs depending on maxbarsback

hi, i put a very short testing script, applying to the same chart data, but with maxbarsback set to 50 and 100, the outputs are different: bullish momentum turns to bearish. the script is: variables: oFastK( 0 ), oFastD( 0 ), SlowK( 0 ), SlowD( 0 ); Value1 = Stochastic( H, L, C, 14, 3, 3, 1, oFastK,...

Go to advanced search