Search found 22 matches

by eroleyikan
03 Aug 2016
Forum: MultiCharts .NET
Topic: convert eld to MC.Net
Replies: 1
Views: 1618

Re: convert eld to MC.Net

Hi, I would suggest with an existing Stochastic indicator and modify it based on your needs. Below is an example code. It is not doing what your indicators were doing but I think it would be good starting point for you to understand how the .net version works. I hope this helps. using System; using ...
by eroleyikan
03 Aug 2016
Forum: MultiCharts .NET
Topic: net profit trail stop? [SOLVED]
Replies: 5
Views: 2521

Re: net profit trail stop? [SOLVED]

Rob,
To achieve what you are looking for, I would try this:
When you reach that $1500 net income level, calculate (ie back-into) the price that will correspond to that $300 decline and place a stop order at that price.
I do something similar to this and it works for me.
I hope this helps.
Erol
by eroleyikan
20 Jul 2016
Forum: MultiCharts .NET
Topic: track market position
Replies: 9
Views: 3979

Re: track market position

Rob,
This is beyond my knowledge of how MC works. I will leave this to someone from MC to respond/resolve.
Thanks
Erol
by eroleyikan
13 Jul 2016
Forum: MultiCharts .NET
Topic: track market position
Replies: 9
Views: 3979

Re: track market position

Rob, I agree with ABC, that's a guaranteed infinite loop. Even with the exit attempt, it would be infinite, because if you have IOG enabled, your calcbar() code is running every tick anyways. Without knowing exactly what you are trying to do, I would think that using an if statement would work just ...
by eroleyikan
12 Jul 2016
Forum: MultiCharts .NET
Topic: track market position
Replies: 9
Views: 3979

Re: track market position

Bob, I use Trademanager to track my market position real time. I cannot post full code without stripping strategy specific lines. But here is what I do in summary, and it works great. It would do what you need Declare these class level variables bool subscribed = false; TradeManager.IPositions posit...
by eroleyikan
11 Jul 2016
Forum: MultiCharts .NET
Topic: Native OCO and IOG mode
Replies: 4
Views: 2029

Re: Native OCO and IOG mode

Correct, if I had IOG disabled -as I used to have- then the stop price gets updated only at the close of the bar. Recently I enabled IOG. I update the price of my stop order inside the bar as needed. The order is at the server. So it gets triggered when the price is hit even if i am disconnected. In...
by eroleyikan
11 Jul 2016
Forum: MultiCharts .NET
Topic: Native OCO and IOG mode
Replies: 4
Views: 2029

Re: Native OCO and IOG mode

Hi Dave,
I use interactive brokers, which supports native OCO orders. IOG functionality works as expected.
Thanks
Erol
by eroleyikan
08 Jul 2016
Forum: MultiCharts .NET
Topic: IB error 168 [SOLVED]
Replies: 9
Views: 3611

Re: IB error 168 [SOLVED]

Well, your OCO order is sent to the server each time CalcBar() runs. If you have [IOGMode(IOGMode.Enabled)] then your OCO order is being sent every tick, if any of the order parameters are changed. I know it is counter-intuitive, but that's how it works. Each time CalcBar() runs, MC is sending your ...
by eroleyikan
08 Jul 2016
Forum: MultiCharts .NET
Topic: IB error 168 [SOLVED]
Replies: 9
Views: 3611

Re: IB error 168 [SOLVED]

Darob, I use the OCO brackets and I had this issue as well. Easy to solve. make sure that your StopLossAmt and PRofitTragetAmt values are large enough to generate a large enough price change. The price difference must be larger than the "minimum move" allowed for the symbol you are trading . You can...
by eroleyikan
08 Jul 2016
Forum: MultiCharts .NET
Topic: Reversing positions [SOLVED]
Replies: 2
Views: 2373

Re: Reversing positions [SOLVED]

I worked with Dave from MC on this issue. I just wanted to post a follow up on this thread in case the information is useful for others. It turns out, in the code I posted above, the explicit exit orders are not required. When you send an entry order, the previous position is closed automatically. A...
by eroleyikan
29 Jun 2016
Forum: MultiCharts .NET
Topic: ReactOS - The new Open Source and free "Windows-like" system
Replies: 1
Views: 2744

Re: ReactOS - The new Open Source and free "Windows-like" sy

Archer,
Thanks for this info. I briefly looked at the links you posted. Wikipedia says this OS was derived from earlier versions of Windows. In your opinion, what is the benefit of using this OS over windows 7 for example?
Thanks
Erol
by eroleyikan
29 Jun 2016
Forum: MultiCharts .NET
Topic: TradeManager.TradingData.Positions.Items.Length = 0 even if
Replies: 4
Views: 3448

Re: TradeManager.TradingData.Positions.Items.Length = 0 even

gztanwei, I don't know if your issue was resolved... I was having a similar issue, where my position would show-up with a delay. Where you are calling the TradeManager.ProcessEvents() is critical. I was calling it at the end of the calcBar() method and IOG was disabled. So the bar would place an ord...
by eroleyikan
29 Jun 2016
Forum: MultiCharts .NET
Topic: Reversing positions [SOLVED]
Replies: 2
Views: 2373

Reversing positions [SOLVED]

Hello, I have a piece of code that reverses my position at the end of a bar. Orders for exit from the existing position and entry into the new position are sent together at the same time. The code is below. This code works MOST of the time as expected. For example, if I am 30K short, I see ONE order...
by eroleyikan
29 Jun 2016
Forum: MultiCharts .NET
Topic: ExecControl.Recalculate() error [SOLVED]
Replies: 10
Views: 5508

Re: ExecControl.Recalculate() error [SOLVED]

Thanks for everyone's help. I finalized my code. I thought I would post back a summary of the final solution in case it would be helpful for others. Functionality: place one entry order and a pair of stop and limit orders ALL at the same time at the end of a bar. Then, during the next bar update the...
by eroleyikan
20 Jun 2016
Forum: MultiCharts .NET
Topic: ExecControl.Recalculate() error [SOLVED]
Replies: 10
Views: 5508

Re: ExecControl.Recalculate() error [SOLVED]

The calcreason says "Default".
changed the code so that the needRecalc is set to true only if the price moves more than a point. That works, but the lastbar keeps recalculating what appears to be at every tick.
Is there any way to control this?
by eroleyikan
20 Jun 2016
Forum: MultiCharts .NET
Topic: IntraBarOrderGeneration [SOLVED]
Replies: 4
Views: 3765

Re: IntraBarOrderGeneration [SOLVED]

Thanks for your help Josh. The error issue is resolved. There are still related open questions but I will continue on the other thread. I am marking this solved.
by eroleyikan
20 Jun 2016
Forum: MultiCharts .NET
Topic: ExecControl.Recalculate() error [SOLVED]
Replies: 10
Views: 5508

Re: ExecControl.Recalculate() error [SOLVED]

Thanks Henry, this is working without an error now. But the last bar code is getting executed multiple times every second even though I am setting needRecalc = false each time. In the example code below, I tried to recalculate only ONCE when the price changes but the lastbar code seems to run 4 or 5...
by eroleyikan
17 Jun 2016
Forum: MultiCharts .NET
Topic: IntraBarOrderGeneration [SOLVED]
Replies: 4
Views: 3765

Re: IntraBarOrderGeneration [SOLVED]

Josh, Thank you for your earlier response on this. Since the last post I made some progress. Still have some questions, but this time I can be more specific and hopefully clearer.. I have a piece of code like this: protected override void CalcBar() { //...some logic if (Bars.LastBarOnChart) { //... ...
by eroleyikan
17 Jun 2016
Forum: MultiCharts .NET
Topic: ExecControl.Recalculate() error [SOLVED]
Replies: 10
Views: 5508

Re: ExecControl.Recalculate() error [SOLVED]

Henry,
Thanks for your response, I am not clear though... calcBar is what gets re-run when the recalculate command is issued, is it not? How does it make sense to call recalculate() from withing calcBar?

Can you point to an example or thread that demonstrates this behavior?
Thank you
Erol
by eroleyikan
16 Jun 2016
Forum: MultiCharts .NET
Topic: ExecControl.Recalculate() error [SOLVED]
Replies: 10
Views: 5508

Re: ExecControl.Recalculate() error [SOLVED]

Thanks Henry. I can do that, but I will still have the problem of my strategy not recalculating. I would like my strategy to recalculate based on real-time price conditions. I implemented the DataLoader example from the programming guide. I can get the current price of the symbol I am on. I want to ...
by eroleyikan
15 Jun 2016
Forum: MultiCharts .NET
Topic: ExecControl.Recalculate() error [SOLVED]
Replies: 10
Views: 5508

ExecControl.Recalculate() error [SOLVED]

Hello, My strategy is generating the below error message upon executing the ExecControl.Recalculate(); line (ie, this is the line 377 that is mentioned in the error message). The code in the last bar calculation is running fine on its own. When the error occurs, the code execution does not even get ...
by eroleyikan
01 Jun 2016
Forum: MultiCharts .NET
Topic: IntraBarOrderGeneration [SOLVED]
Replies: 4
Views: 3765

IntraBarOrderGeneration [SOLVED]

Hi, I am transitioning from TS, so I am new to this forum. I converted most of my code to c#. I have a few shortcomings left. I am using a Renko chart. I am trying to update the prices of my stop or limit orders based on certain conditions within the bar (ie before the last bar closes). Orders are p...

Go to advanced search