Search found 21 matches

by Eduardo
13 Jan 2021
Forum: MultiCharts
Topic: Entries This Session
Replies: 1
Views: 555

Entries This Session

Hello, I'm trying to code something similar to the Entriestoday function but in relation to the session. My forex session goes from 1700 to 1659 of the next day, so Entriestoday(date) doesn't work, because there is a change of date during the session. I guess I'm not the only one with this question ...
by Eduardo
22 Dec 2020
Forum: MultiCharts
Topic: Run code when order is closed [SOLVED]
Replies: 2
Views: 557

Re: Run code when order is closed [SOLVED]

Thank you, I'll try that.
by Eduardo
22 Dec 2020
Forum: MultiCharts
Topic: "Open of Tomorrow" [SOLVED]
Replies: 2
Views: 646

Re: "Open of Tomorrow" [SOLVED]

Thank you.
I didn't know that you could use something like Open[-1]
by Eduardo
21 Dec 2020
Forum: MultiCharts
Topic: "Open of Tomorrow" [SOLVED]
Replies: 2
Views: 646

"Open of Tomorrow" [SOLVED]

Hello, I found an old code for Easylanguage/Powerlanguage that uses the reserved word Tomorrow . Multicharts recognizes it as a reserved word but I can't find any reference about it on the help file, probably it's not used anymore. Was it replaced by another reserved word? Does anybody know what it ...
by Eduardo
07 Dec 2020
Forum: MultiCharts
Topic: Run code when order is closed [SOLVED]
Replies: 2
Views: 557

Run code when order is closed [SOLVED]

Hello, I'm trying to run some code as soon as an order is closed. I'm using TotalTrades and it works well unless the order is entered and closed in the same bar, like in the picture attached. Would there be another way of doing it? Thank you //Run as soon as an order is closed Variables: oldTotalTra...
by Eduardo
08 Nov 2020
Forum: MultiCharts
Topic: RSI Close of Data2 [SOLVED]
Replies: 2
Views: 640

Re: RSI Close of Data2 [SOLVED]

Great, thank you!
by Eduardo
08 Nov 2020
Forum: MultiCharts
Topic: Determine if the last position was closed because of StopLoss [SOLVED]
Replies: 1
Views: 455

Re: Determine if the last position was closed because of StopLoss [SOLVED]

Well, I found a way to do it. Probably not the most elegant one but it works (I only trade forex): Inputs: SL(90); // in Pips vars: previousExitDate(0), numberOfSLhits(0),PipsLost(0),TotalPipsLost(0); //strategy code here if PosTradeExitDateTime(1,0) <> previousExitDate then begin if positionprofit(...
by Eduardo
08 Nov 2020
Forum: MultiCharts
Topic: Determine if the last position was closed because of StopLoss [SOLVED]
Replies: 1
Views: 455

Determine if the last position was closed because of StopLoss [SOLVED]

Hello,

Is there a reserved word (or a way) to know if a position closed was closed because the setstoploss_pt was triggered?

I want to count how many times my Stop Loss was hit in my historical data.

Thank you,
Ed
by Eduardo
08 Nov 2020
Forum: MultiCharts
Topic: Commission "Per Trade"
Replies: 3
Views: 991

Re: Commission "Per Trade"

Thank you!
by Eduardo
08 Nov 2020
Forum: MultiCharts
Topic: RSI Close of Data2 [SOLVED]
Replies: 2
Views: 640

RSI Close of Data2 [SOLVED]

Hello,

What's the difference between these two codes and which one is the correct one? They give similar results but not the same.

1) myRSI = RSI(Close of Data2, 14);


2) myRSI = RSI(Close, 14) of Data2;

Thank you!
Ed
by Eduardo
23 Aug 2020
Forum: MultiCharts
Topic: Commission "Per Trade"
Replies: 3
Views: 991

Commission "Per Trade"

Hello,

When setting the value of commission "per trade", what is a "trade"?

Let's say I go long today and tomorrow I sell my position. Was that transaction two trades or just one trade?

I trade forex and I'll just set a fixed amount of dollars of commission per trade.

Thank you!
Ed
by Eduardo
02 Aug 2020
Forum: MultiCharts
Topic: Avoiding two strategies trading the same symbol at the same time [SOLVED]
Replies: 2
Views: 784

Avoiding two strategies trading the same symbol at the same time [SOLVED]

Hello, I have a quick question, I hope you can help me. I trade Forex with OANDA. I have two different strategies trading the same symbol , but I don't want both of them opening orders at the same time. So, if one strategy gets a signal it will only enter an order if the other strategy doesn't have ...
by Eduardo
29 Jul 2020
Forum: MultiCharts
Topic: Coding Pending orders: DAY/GTC
Replies: 9
Views: 1802

Re: Coding Pending orders: DAY/GTC

Thank you for your help! I'm working on several TF. I just wanted to understand the concept, not necessarily attached to a TF in particular. I've realized that: - while the conditions are true, the pending orders are valid and they will change after each bar if they depend on a movable point of refe...
by Eduardo
28 Jul 2020
Forum: MultiCharts
Topic: Coding Pending orders: DAY/GTC
Replies: 9
Views: 1802

Re: Coding Pending orders: DAY/GTC

Thank you, yes I want to keep the pending order static (not moving nor canceled) until it's hit or canceled by a new signal. So I'll have to find a way to do it. In my strategy when the condition is met, then the pending orders are sent and they just wait in the same place for the price to hit them....
by Eduardo
27 Jul 2020
Forum: MultiCharts
Topic: Coding Pending orders: DAY/GTC
Replies: 9
Views: 1802

Re: Coding Pending orders: DAY/GTC

Got it, so an additional question would be: How do I keep an order pending once the condition for entering the order is not true anymore? (see my little test above) Many strategies identify one bar when the conditions are true to enter the pending order, but after that bar, the conditions are not tr...
by Eduardo
27 Jul 2020
Forum: MultiCharts
Topic: Coding Pending orders: DAY/GTC
Replies: 9
Views: 1802

Re: Coding Pending orders: DAY/GTC

Thank you! I made some tests in the M1 chart with the following code for simplicity: If Time >= 1000 and Time <= 1002 then buy next bar at Close + x Stop; I added a simple condition to be true only for 3 bars. Results: the same for DAY and GTC First bar -> the pending order is created Second bar -> ...
by Eduardo
27 Jul 2020
Forum: MultiCharts
Topic: Coding Pending orders: DAY/GTC
Replies: 9
Views: 1802

Coding Pending orders: DAY/GTC

Hello, I was not able to find an answer to my question in the forum, a little help would be appreciated. I use OANDA. The OANDA plugin allows the option for DAY or GTC for pending orders. Let's say I have this simple code to enter pending orders: buy next bar at High + x Stop; sellshort next bar at ...
by Eduardo
12 Jun 2020
Forum: MultiCharts
Topic: Trading while optimizing
Replies: 2
Views: 847

Re: Trading while optimizing

Ok! I'll give it a try. Thank you for your answer.
Hi,

You can just run 2 or more instances of MC on the same PC, and you'll be fine with your scenario.
by Eduardo
03 Jun 2020
Forum: MultiCharts
Topic: Trading while optimizing
Replies: 2
Views: 847

Trading while optimizing

Hello, Does anybody know if automated trading could be affected if on the same computer I'm running an optimization process at the same time? I have coded a strategy that is training on its own, but I'd like to keep developing new strategies on the same computer at the same time, including running o...
by Eduardo
28 May 2020
Forum: MultiCharts
Topic: Risk according to percent of Equity and Stop Loss
Replies: 1
Views: 883

Risk according to percent of Equity and Stop Loss

I'm trying to program a little function but I'm stuck and I wonder if anybody could give me a hand. I've seen several posts about the topic but none about exactly what I need. I only trade Forex . I would like to trade a fixed percent of my Equity on each order, say 1%. So, according to the Stop Los...

Go to advanced search