Optimizing
Optimizing
I'm not able to optimize even very simple strategies. See pic. Where is problem?
- Attachments
-
- backtest.png
- (37.79 KiB) Downloaded 862 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Optimizing
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?I'm not able to optimize even very simple strategies. See pic. Where is problem?
Is the Profit_Target variable you're trying to optimize on an integer or a floating type variable?
Re: Optimizing
Profit target is "built-in" strategy and Profit_target type is DOUBLE
fractional numbers are not working and error message box is empty
Machine language is CZECH.
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);
}
}
}
Machine language is CZECH.
- Attachments
-
- Untitled.zip
- (3.48 KiB) Downloaded 331 times
Re: Optimizing
It is possible to BACKTEST with fractional numbers in ProfitTarger (or StopLoss), but it's not possible to OPTIMIZE such strategy.
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Optimizing
Hello xzajic,It is possible to BACKTEST with fractional numbers in ProfitTarger (or StopLoss), but it's not possible to OPTIMIZE such strategy.
This issue has been fixed and the fix will be released in the next version of MultiCharts .NET. Thank you for reporting.