Optimizing

Questions about MultiCharts .NET and user contributed studies.
xzajic
Posts: 3
Joined: 18 Aug 2012

Optimizing

Postby xzajic » 18 Aug 2012

I'm not able to optimize even very simple strategies. See pic. Where is problem?
Attachments
backtest.png
backtest.png (37.79 KiB) Viewed 430 times

User avatar
JoshM
Posts: 2089
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1525 times
Been thanked: 1485 times
Contact:

Re: Optimizing

Postby JoshM » 18 Aug 2012

xzajic wrote:I'm not able to optimize even very simple strategies. See pic. Where is problem?

I'm not sure if it will help since you got a strange error message there, but have you tried to replace the , (comma) with a . (dot) for fractional numbers?

Is the Profit_Target variable you're trying to optimize on an integer or a floating type variable?

xzajic
Posts: 3
Joined: 18 Aug 2012

Re: Optimizing

Postby xzajic » 18 Aug 2012

Profit target is "built-in" strategy and Profit_target type is DOUBLE

Code: Select all

namespace PowerLanguage.Strategy
{
    public class Profit_Target : SignalObject
    {
        private double m_amount = 5;
        public Profit_Target(object ctx) :
            base(ctx) {}
        [Input]
        public bool positionbasis { get; set; }
        [Input]
        public double amount{
            get { return m_amount; }
            set { m_amount = value; }
        }
        protected override void CalcBar(){
            if (positionbasis){
                CurSpecOrdersMode = ESpecOrdersMode.PerPosition;
            }
            else{
                CurSpecOrdersMode = ESpecOrdersMode.PerContract;
            }
            GenerateProfitTarget(amount);
        }
    }
}

fractional numbers are not working and error message box is empty ;-)
Machine language is CZECH.
Attachments
Untitled.zip
(3.48 KiB) Downloaded 194 times

xzajic
Posts: 3
Joined: 18 Aug 2012

Re: Optimizing

Postby xzajic » 18 Aug 2012

It is possible to BACKTEST with fractional numbers in ProfitTarger (or StopLoss), but it's not possible to OPTIMIZE such strategy.

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Optimizing

Postby Dave Masalov » 21 Aug 2012

xzajic wrote:It is possible to BACKTEST with fractional numbers in ProfitTarger (or StopLoss), but it's not possible to OPTIMIZE such strategy.


Hello xzajic,

This issue has been fixed and the fix will be released in the next version of MultiCharts .NET. Thank you for reporting.


Return to “MultiCharts .NET”