Setting Profit & Stop Targets  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
User avatar
master.aurora
Posts: 33
Joined: 21 Jan 2013
Location: Islamabad
Has thanked: 6 times
Been thanked: 3 times
Contact:

Setting Profit & Stop Targets

Postby master.aurora » 13 Mar 2013

Hello,

I have been working on a backtesting strategy which sets profit & stop targets based on a certain calculation. The calculation obviously give me a price to put in as the target. But, apparently i can only set an amount as Profit or Stop target. This is pretty difficult to work with as it makes validating the code very difficult. Is there another way around this? May be able to put in price targets?

Any sort of help would be welcome.

Thanks.
Umer

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Setting Profit & Stop Targets  [SOLVED]

Postby Henry MultiСharts » 14 Mar 2013

Hello Umer,

The easiest way in this situation is to send limit orders at a certain price instead of profit targets.
Alternatively you can create a logic to convert the price value you have into the amount of profit acceptable by GenerateProfitTarget.

User avatar
master.aurora
Posts: 33
Joined: 21 Jan 2013
Location: Islamabad
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Setting Profit & Stop Targets

Postby master.aurora » 14 Mar 2013

When using the portfolio backtester, how can we follow this approach of limit/stop orders? We can only send them once we know that our original entry order has been filled. But, as far as i know, there is no way of finding out whether an order has been filled or not while using the backtester.

Please advise.

Thanks,
Umer

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Setting Profit & Stop Targets

Postby Henry MultiСharts » 19 Mar 2013

Do you mean you send these exit orders only if market position is <>0 ?
This logic works in both realtime and backtesting.


Return to “MultiCharts .NET”