Search found 33 matches

by quod_erat
24 May 2021
Forum: MultiCharts
Topic: Buy order doesn't fire
Replies: 2
Views: 473

Re: Buy order doesn't fire

Thanks -- I think #1 is exactly right! My primary coding is done in python, where indents matter ... I sometimes forget that they don't here!

And I agree on #2. My actual code has a more descriptive variable name. This is just lazy dummy code :)
by quod_erat
24 May 2021
Forum: MultiCharts
Topic: Buy order doesn't fire
Replies: 2
Views: 473

Buy order doesn't fire

I've done plenty of coding in EasyLanguage, and so far, I could always work out bugs when they came up. But I can't figure out this issue; it feels like I'm missing something basic but I can't put my finger on it. I'm trying to 'prime' a program, so that once event A occurs, it then looks for event ...
by quod_erat
28 Dec 2020
Forum: MultiCharts
Topic: Sort by Select Net Profit in optimization
Replies: 2
Views: 882

Re: Sort by Select Net Profit in optimization

I know this thread has been dormant for a while, but I wanted to circle back to it, now that we have the option of automatically optimizing. Is there a formula for calculating this .... is it "simply" excluding anything above/below x standard deviations, or is there more to it?
by quod_erat
15 Dec 2020
Forum: MultiCharts
Topic: Marketposition for Data2
Replies: 5
Views: 1168

Re: Marketposition for Data2

Here's one way I found around it: Strat 1 AAPL Data1 [IntrabarOrderGeneration = True] if currenttime_s > 080000 and marketposition = 0 then buy next bar at market; pmm_set_global_named_num("mpx", 1); Strat 2 QQQ Data1 --- AAPL Data2 if pmm_get_global_named_num("mpx") > 0 then sell short num_share sh...
by quod_erat
15 Dec 2020
Forum: MultiCharts
Topic: Marketposition for Data2
Replies: 5
Views: 1168

Re: Marketposition for Data2

Go to the Wiki 8 PowerLanguage Keyword Reference Look under Plotting ‎ (14 P) I_getplotvalue I_setplotvalue I thought those only worked with indicators, right? I'm trying to communicate between two signal-based strategies. Let's say I wanted to automatically hedge a new position. On the most basic ...
by quod_erat
14 Dec 2020
Forum: MultiCharts
Topic: MultiCharts for MAC [SOLVED]
Replies: 2
Views: 3753

Re: MultiCharts for MAC [SOLVED]

I'd recommend installing windows on your mac, through whatever dual-boot option Mac OS has (Boot Camp?). Most trading software is going to be designed for windows.
by quod_erat
14 Dec 2020
Forum: MultiCharts
Topic: Marketposition for Data2
Replies: 5
Views: 1168

Marketposition for Data2

I must be misunderstanding something about the different marketposition functions. Let's say that I'm long AAPL, and I want to automatically hedge against market risk by going short SPY. Because MC can't send buy/sell orders on data2, my understanding was that the setup would look something like thi...
by quod_erat
13 Dec 2020
Forum: MultiCharts
Topic: Calculating Beta
Replies: 1
Views: 403

Re: Calculating Beta

For anyone interested, this is what I hand-coded so far. I think it's right, though I haven't verified it yet: input: length(100); vars: return(0), return_benchmark(0), sd_security(0), sd_benchmark(0), Beta(0); return = (close of data2 - close of data2[1])/close of data2; return_benchmark = (close- ...
by quod_erat
12 Dec 2020
Forum: MultiCharts
Topic: Calculating Beta
Replies: 1
Views: 403

Calculating Beta

Does anyone here know if MC has a built-in function for calculating the beta between two stocks? Something like what's described here -- https://www.investopedia.com/ask/answers/070615/what-formula-calculating-beta.asp . It's something that's hand-codeable, but if there's an existing function, I'd r...
by quod_erat
12 Oct 2020
Forum: MultiCharts
Topic: Matching MC bars to TradingView bars [SOLVED]
Replies: 7
Views: 2019

Re: Matching MC bars to TradingView bars [SOLVED]

Turns out, there's a fairly basic solution that works pretty well here, at least for my bar resolution (move from 1h to 60min): viewtopic.php?t=46357
by quod_erat
12 Oct 2020
Forum: MultiCharts
Topic: Matching MC bars to TradingView bars [SOLVED]
Replies: 7
Views: 2019

Re: Matching MC bars to TradingView bars [SOLVED]

The only option I can think of, is to define your own price bars with the custom resolution feature in the QuoteManager. That would allow you to code your own chart resolution. I don't know of a manual option that can make MultiCharts charts behave like TradingView charts. Yikes -- I took a look ar...
by quod_erat
08 Oct 2020
Forum: MultiCharts
Topic: Matching MC bars to TradingView bars [SOLVED]
Replies: 7
Views: 2019

Re: Matching MC bars to TradingView bars [SOLVED]

Thanks JoshM. I'm not too worried about the different data feeds -- these are 1h resolution bars, and I'm swing-trading them over a few days or longer, so a few cents of difference are ok. The timestamp, on the other hand, can create some weird cumulative differences between the two strategies. What...
by quod_erat
07 Oct 2020
Forum: MultiCharts
Topic: Matching MC bars to TradingView bars [SOLVED]
Replies: 7
Views: 2019

Matching MC bars to TradingView bars [SOLVED]

I'm using MC for my automated trading, but with the data connection to Interactive Brokers being exceptionally slow, I've started using TradingView for my general charting, and increasingly backtesting as well (their data for backtesting loads in fractions of a second, compared to the sometimes hour...
by quod_erat
31 Aug 2020
Forum: MultiCharts
Topic: Volume Profile time settings
Replies: 1
Views: 770

Volume Profile time settings

spwr.PNG I'm not sure if this is a bug, or if I misunderstand something. I loaded a Volume Profile for SPWR (see attached screenshot), daily chart. The chart itself goes back a few months, but VP Time setting is set to 3 weeks. My understanding was that the 'Time' setting controls what bars are con...
by quod_erat
25 Jun 2020
Forum: MultiCharts
Topic: Sort by Select Net Profit in optimization
Replies: 2
Views: 882

Sort by Select Net Profit in optimization

Apologies if this has been addressed somewhere else, but is there a way to show "Select Net Profit" in the optimization output? I'm trying to avoid overfitting, which is what often happens in the highest Net Profit rows.
by quod_erat
14 May 2020
Forum: MultiCharts
Topic: Caching IB historical data
Replies: 7
Views: 1348

Re: Caching IB historical data

Hi! Sure... happy to help. I pay $124 a month. It's about $90 for the service, then you pay per exchange on top of that... so I pay $25 for CME futures and $7 for NASDAQ equities. ICE futures is the most expensive; not using that yet, it's $116. The exchanges set the fees, so you won't find a price...
by quod_erat
13 May 2020
Forum: MultiCharts
Topic: Caching IB historical data
Replies: 7
Views: 1348

Re: Caching IB historical data

I had the same issue PLUS all sorts of other things didn't work when I started and was using IB for data. I spent a long time with the excellent MC support who couldn't fix most of it. I eventually found a page on IB that's hard to find that basically admits that they are not a data provider, even ...
by quod_erat
10 May 2020
Forum: MultiCharts
Topic: Caching IB historical data
Replies: 7
Views: 1348

Caching IB historical data

I wonder if I'm doing something wrong here. I'm using MC with IB, and have around half a dozen workspaces on which I track maybe 40-50 tickers. Various time frames. Whenever I close MC and re-open (or if MC crashes), it takes a very long time to reload the historical data I'd already had loaded/runn...
by quod_erat
09 May 2020
Forum: MultiCharts
Topic: Execute only once while condition is present [SOLVED]
Replies: 5
Views: 1246

Re: Execute only once while condition is present [SOLVED]

Another way to code this logic:

Code: Select all

If RSI > 70 and RSI [1] <= 70 then . . .
Is there an advantage of doing it this way (computationally or otherwise)?
by quod_erat
09 May 2020
Forum: MultiCharts
Topic: Execute only once while condition is present [SOLVED]
Replies: 5
Views: 1246

Re: Execute only once while condition is present [SOLVED]

What you should be looking for is the first instance of RSI crossing into 70+.
What a great example of how you just need a second pair of eyes on a problem sometimes. I was deep in the for/while/repeat-loops weeds and complex counters. I can't believe I was so blind to

Code: Select all

crosses over
. Thanks!
by quod_erat
08 May 2020
Forum: MultiCharts
Topic: Execute only once while condition is present [SOLVED]
Replies: 5
Views: 1246

Execute only once while condition is present [SOLVED]

I think similar questions have been asked, but nothing specifically about what I'm looking for: Let's say my strategy is to buy when RSI > 70, with some kind of profit condition and stop loss. Dummy code would look something like if RSI > 70 then Buy next bar market; setstopposition; setstoploss(100...
by quod_erat
22 Apr 2020
Forum: MultiCharts
Topic: Trading multiple tickers in one strategy?
Replies: 1
Views: 861

Trading multiple tickers in one strategy?

I'm pretty sure that's not possible, but wanted to verify. In Portfolio Trader, is it possible to trade multiple tickers within the same strategy from the Data1 line? I know it's not possible off a chart, but in PT, there are multiple rows available in the Data1 column, so maybe? This would be for p...
by quod_erat
10 Apr 2020
Forum: MultiCharts
Topic: Avoiding multiple entries.
Replies: 5
Views: 1535

Re: Avoiding multiple entries.

There's a

Code: Select all

once
keyword in EasyLanguage that may work here. I never used it though, so I don't know if it resets after each bar (which is what you'd presumably want, unless you just want one trade per day).
by quod_erat
30 Mar 2020
Forum: MultiCharts
Topic: "The Automated Order Execution mode has been turned off"
Replies: 2
Views: 1327

Re: "The Automated Order Execution mode has been turned off"

Sort of a follow up here, and I'm not sure if it's an IB or a MC question. When I send orders into the after-hours market (post-4pm EST), orders don't get executed. IB seems to receive those orders, but when I look at the details (via the "Modify Order" function in IB), the checkbox to submit/execut...
by quod_erat
28 Mar 2020
Forum: MultiCharts
Topic: how planned flag and pennant
Replies: 2
Views: 972

Re: how planned flag and pennant

There's a pennant breakout indicator that comes default with the software. Can easily be converted to a signal as well.
by quod_erat
27 Mar 2020
Forum: MultiCharts
Topic: how planned flag and pennant
Replies: 2
Views: 972

Re: how planned flag and pennant

I think there’s an indicator for this included in Multicharts? Don’t have it running right now, but can check later.
by quod_erat
27 Mar 2020
Forum: MultiCharts
Topic: Close at end of day (again, I know) [SOLVED]
Replies: 13
Views: 3562

Re: Close at end of day (again, I know) [SOLVED]

An idea, why would you not just create a custom session template, to end 1minute before real RTH ? This is how i have solved same problem using daily bars thought... but still should work solving your problem. I just end my session at 15 59, since real session ends at 16 00... then my orders get ex...
by quod_erat
27 Mar 2020
Forum: MultiCharts
Topic: "The Automated Order Execution mode has been turned off"
Replies: 2
Views: 1327

"The Automated Order Execution mode has been turned off"

I use Portfolio Trader to send auto-trading orders to IB. Today, the code generated signals to open/close positions around 5 pm (so outside RTH), but they were never executed by IB (and, I think -- though I'll have to look more closely -- were never received). When I checked the log, I saw the follo...
by quod_erat
24 Mar 2020
Forum: MultiCharts
Topic: Close at end of day (again, I know) [SOLVED]
Replies: 13
Views: 3562

Re: Close at end of day (again, I know) [SOLVED]

I'll need to think more about this, because it's not quite working yet. I understand the logic you describe, but here's the problem. Let's say this is the logic to open a position: if condition1 then Buy next bar at High + 1 point stop ; The code generates a signal based on some vars, and then sends...
by quod_erat
23 Mar 2020
Forum: MultiCharts
Topic: Close at end of day (again, I know) [SOLVED]
Replies: 13
Views: 3562

Re: Close at end of day (again, I know) [SOLVED]

Ok, I think I got it. So if my signals come from 15-minute bars, I would put 15min on data2. Then, for example, if I wanted to exit five 15-min bars after entering a position (just using one of the pre-made examples), I'd write: [IntrabarOrderGeneration = false] inputs: BarToExitOn( 5 ); if BarsSinc...
by quod_erat
23 Mar 2020
Forum: MultiCharts
Topic: Close at end of day (again, I know) [SOLVED]
Replies: 13
Views: 3562

Re: Close at end of day (again, I know) [SOLVED]

But can I enter a position from data2? If I ran data1 as 1-min, I'd have to run my strategy on data2, e.g.:

Code: Select all

Buy ( "MomLE" ) next bar at High of data2
I was under the impression that you can't submit orders from data2. But it's possible that I remember that from a different language framework ...
by quod_erat
23 Mar 2020
Forum: MultiCharts
Topic: Close at end of day (again, I know) [SOLVED]
Replies: 13
Views: 3562

Re: Close at end of day (again, I know) [SOLVED]

Thanks, you're right -- I had `Next Bar at Market;` initially, and changed for testing purposes. But it doesn't address my problem yet, because on a 15 min candle, I'd have to close at 3:45 to be out of the trade at 4:00. Is it possible to use a data2 stream with 1-min resolution to trigger the sell...
by quod_erat
23 Mar 2020
Forum: MultiCharts
Topic: Close at end of day (again, I know) [SOLVED]
Replies: 13
Views: 3562

Close at end of day (again, I know) [SOLVED]

New to the forum, and really enjoying Multicharts. But there’s one thing I can’t quite figure out, and I hope someone can help. I’m using the Portfolio Trader, and want to close a strategy before close of RTH session (4 pm EST). I’ve read through just about every thread on it, and I’m using the code...

Go to advanced search