Search found 21 matches
- 08 Apr 2024
- Forum: MultiCharts
- Topic: Counting Bars on Chart
- Replies: 3
- Views: 168
Re: Counting Bars on Chart
First, you need to create a VARIABLE to store the count value. As soon as the event is triggered (eg crossover), you can add 1 to the variable for every new bar. Try this: Var: Bar.Count(0); Bar.Count = BarCount +; if (MA1 > MA2 and MA1[1] <= to MA2[1]) or (MA1 < MA2 and MA1[1] >= to MA2[1]) then B...
- 26 Mar 2024
- Forum: MultiCharts
- Topic: Counting Bars on Chart
- Replies: 3
- Views: 168
Re: Counting Bars on Chart
Thank you vey much TJ. Will give it a try.
- 26 Mar 2024
- Forum: MultiCharts
- Topic: Counting Bars on Chart
- Replies: 3
- Views: 168
Counting Bars on Chart
Hi. Does anyone have an example of how to count bars since an event like a MA crossover?
Thanks.
Thanks.
- 11 Dec 2023
- Forum: MultiCharts
- Topic: SetStopLoss [SOLVED]
- Replies: 5
- Views: 412
Re: SetStopLoss [SOLVED]
Thanks TJ. And I guess same would apply to a calculated profit target?
And no need to reset the var back to 0 as each new entry automatically updates it, correct?
Thanks.
And no need to reset the var back to 0 as each new entry automatically updates it, correct?
Thanks.
- 10 Dec 2023
- Forum: MultiCharts
- Topic: SetStopLoss [SOLVED]
- Replies: 5
- Views: 412
Re: SetStopLoss [SOLVED]
Thanks TJ. I have enclosed the code below. I see on every bar update it recalculates the stop. I do not want that happening once we enter trade and place initial stop. Is there a way in Multi Charts to keep initial protective stop static? I use SetStop and SetTarget as they place stops and targets i...
- 09 Dec 2023
- Forum: MultiCharts
- Topic: SetStopLoss [SOLVED]
- Replies: 5
- Views: 412
SetStopLoss [SOLVED]
I was trying SetStopLoss with a 2 bar low and saw it updated on every bar. Is there a way to keep SetStopLoss in same place after entry? I use it since it places the protective stop immediately after entry.
Thanks.
Thanks.
- 06 Mar 2023
- Forum: MultiCharts
- Topic: Keeping SetStopLoss Static.
- Replies: 5
- Views: 664
Re: Keeping SetStopLoss Static.
Eric1704, one way could be using a variable to store the amount you use for SetStopLoss and only allow updating this variable when you are not long. Then you use this variable in SetStopLoss. Regards, ABC Thanks. Will doing that in the same script be fine? I have seen it update on each bar that I d...
- 05 Mar 2023
- Forum: MultiCharts
- Topic: Keeping SetStopLoss Static.
- Replies: 5
- Views: 664
Keeping SetStopLoss Static.
Hi. I use SetStopLoss to be able to set a stop right away on entry. I set it to like lowest or highest of last X bars. I have noticed it updates on each new bar to the highest or lowest new value. Is there a way to keep it as originally placed right away upon entry and not update on each new bar? Th...
- 24 Feb 2023
- Forum: MultiCharts
- Topic: SetStopLoss with highs and lows.
- Replies: 12
- Views: 1293
Re: SetStopLoss with highs and lows.
Thanks TJ. I have seen like half a second to a secong lag between time a bar closes and order generation. Maybe upgrade the VPS? Theoretically, it should not make a difference. Your need is to evaluate the stop position at every tick. Whether it is done through the built-in stoploss or through codi...
- 24 Feb 2023
- Forum: MultiCharts
- Topic: SetStopLoss with highs and lows.
- Replies: 12
- Views: 1293
Re: SetStopLoss with highs and lows.
If you want to trade at the end of the bar, but set your stop intra-bar, you can do the following: 1. Enable IOG IntrabarOrderGeneration. 2. On your trading logic, add BARSTATUS=2. Thanks TJ. Does setting IOG to ON slow down MC in any way? Especially with an instrument like NQ. Thanks. No, not that...
- 23 Feb 2023
- Forum: MultiCharts
- Topic: SetStopLoss with highs and lows.
- Replies: 12
- Views: 1293
Re: SetStopLoss with highs and lows.
Thanks TJ. Does setting IOG to ON slow down MC in any way? Especially with an instrument like NQ.If you want to trade at the end of the bar, but set your stop intra-bar, you can do the following:
1. Enable IOG IntrabarOrderGeneration.
2. On your trading logic, add BARSTATUS=2.
Thanks.
- 22 Feb 2023
- Forum: MultiCharts
- Topic: SetStopLoss with highs and lows.
- Replies: 12
- Views: 1293
Re: SetStopLoss with highs and lows.
Hi Eric1704, Can the keyword SetStopLoss in Stop Loss default Signal be modified and used with highs and lows instead of dollar amount? No, it cannot. Stop Loss is always calculated as an offset from the entry price. You can use regular stop orders for your needs. Thanks. I do not want to wait for ...
- 21 Feb 2023
- Forum: MultiCharts
- Topic: SetStopLoss with highs and lows.
- Replies: 12
- Views: 1293
Re: SetStopLoss with highs and lows.
hmm I am new myself to PL , id also like to know the solution. Perhaps you can use 2 different data sources in code with different time frames. What bar time frame are you using? If it was daily then perhaps you could set up a data2 with smaller time frame so it would occur within the daily bar? I ...
- 20 Feb 2023
- Forum: MultiCharts
- Topic: SetProfitTarget/SetStopLoss rejected in FOREX live trading at IB
- Replies: 5
- Views: 645
Re: SetProfitTarget/SetStopLoss rejected in FOREX live trading at IB
Wish MultiCharts would allow SetStopLoss and SetProfitTarget using Highs and Lows instead of just currency or points.
- 20 Feb 2023
- Forum: MultiCharts
- Topic: SetStopLoss with highs and lows.
- Replies: 12
- Views: 1293
Re: SetStopLoss with highs and lows.
I think you can create a variable and just reference it with stop. Someone will probably correct this but off top of head something like Input: Length(2); Var: stophigh(0); stophigh = Highest(High, Length); If marketposition =-1 then begin buytocover next bar at stophigh stop; end; Thanks. This wor...
- 16 Feb 2023
- Forum: MultiCharts
- Topic: SetStopLoss with highs and lows.
- Replies: 12
- Views: 1293
SetStopLoss with highs and lows.
Hi. Can the keyword SetStopLoss in Stop Loss default Signal be modified and used with highs and lows instead of dollar amount? Like stop at high of bar number 5 or stop at lowest of last 2 bars? Is price recognized by this keyword?
Thanks.
Thanks.
- 07 Jan 2023
- Forum: MultiCharts
- Topic: Pre-built Signals.
- Replies: 4
- Views: 573
Re: Pre-built Signals.
Is this correct? Thanks. Something like this? AM new to MC. On the bottom of the curve yet. [IntrabarOrderGeneration = false] inputs: Amount( 5 ), PositionBasis( false ) ; if PositionBasis then SetStopPosition else SetStopShare ; if MarketPosition = 1 then SetProfitTarget_PT( Amount ) ; And 5 will b...
- 06 Jan 2023
- Forum: MultiCharts
- Topic: Pre-built Signals.
- Replies: 4
- Views: 573
Re: Pre-built Signals.
Eric1704, Multicharts has reserved words that would compute a tick based target or stop - namely SetProfitTarget_PT and SetStopLoss_PT. You could create your own versions of Profit Target LX and SX by replacing SetProfitTarget. I would just suggest to do this a strategy with a different name, to av...
- 05 Jan 2023
- Forum: MultiCharts
- Topic: Pre-built Signals.
- Replies: 4
- Views: 573
Pre-built Signals.
Hello. I see MC has a pre-built Signal for Profit Target LX and SX. It is in dollars though. Do they have one in ticks rather than a dollar amount. Like a stop and target value in ticks instead of dollars? Can stops and targets be placed in ticks in Multi Charts?
Thanks.
Thanks.
- 04 Jan 2023
- Forum: MultiCharts
- Topic: Error Message. [SOLVED]
- Replies: 2
- Views: 476
Re: Error Message. [SOLVED]
Eric1704, rejections are usually coming from the broker and from you screenshot it appears the account might not be correctly configured. You can configure the broker plugin on the "Auto Trading" tab of the "Strategy Properties" dialog window. The following links might be helpful for you: https://w...
- 03 Jan 2023
- Forum: MultiCharts
- Topic: Error Message. [SOLVED]
- Replies: 2
- Views: 476
Error Message. [SOLVED]
Hello all. New here. I was trying to run a sample automated strategy built in MC and got following error. What does it mean? I have chart set to SIM account for trading strategy.
Thank you.
Thank you.