I am having problems running a strategy in SIM on multiple symbols where at times many error messages appear (see attached) and the strategy is also disabled at times.
The first thing I noticed is when you use currency the amount is for the entire position is this correct?
I used one of the sample strategy scaling out example strategies and here is a snippet of the strategy:
Can someone please let me know what is wrong thank you very much?
PTarget1 = 500;
PTarget2 = 900;
PTarget3 = 1200;
PTarget4 =1400;
PTarget5 = 2500;
TStop = 200;
InitStop = 20;
ProcessHours_Initialize();
}
else if (State == State.Configure)
{
ProcessHours_OnStartUp();
SetProfitTarget("Long 1a", CalculationMode.Currency, PTarget1);
SetProfitTarget("Long 1b", CalculationMode.Currency, PTarget2);
SetProfitTarget("Long 1c", CalculationMode.Currency, PTarget3);
SetProfitTarget("Long 1d", CalculationMode.Currency, PTarget4);
SetProfitTarget("Long 1e", CalculationMode.Currency, PTarget5);
SetProfitTarget("Short1a", CalculationMode.Currency, PTarget1);
SetProfitTarget("Short 1b", CalculationMode.Currency, PTarget2);
SetProfitTarget("Short1c", CalculationMode.Currency, PTarget3);
SetProfitTarget("Short1d", CalculationMode.Currency, PTarget4);
SetProfitTarget("Short1e", CalculationMode.Currency, PTarget5);
SetTrailStop(CalculationMode.Ticks,TStop);
some long or short condition;
EnterLong(Convert.ToInt32(DefaultQuantity), "Long1a");
EnterLong(Convert.ToInt32(DefaultQuantity), "Long1b");
EnterLong(Convert.ToInt32(DefaultQuantity), "Long1c");
EnterLong(Convert.ToInt32(DefaultQuantity), "Long1d");
Glen
Comment