I retested an SQ3 strategy (attached) with the same TickStory data, the results are 100% different. Equity curve is all over the place.
The pseudo code of the strategy looks odd:
//--------------------------------------------------------------------
// Pseudo Source Code of Strategy 0.3638
//
// Generated by StrategyQuant X Build 111 for MetaTrader
// at 09/25/2018 21:06
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// Strategy Parameters
//--------------------------------------------------------------------
int MagicNumber = 12345;
bool ReplaceExistingOrders = true;
Main chart = Current Symbol / Current TF
//--------------------------------------------------------------------
// Trading rule: Long Entry (On Bar Open)
//--------------------------------------------------------------------
if (No Trade Recently Closed
and (Stochastic(Main chart,9, 3, 20).Slow%D[1] < 50))
{
// Action #1
Open Long order at (SMA(Main chart,2)[1] + (-0.6 * BarRange(Main chart)[43])) Stop;
Order valid for 100 bars;
Stop Loss = 140 pips;
Profit target = 200 pips;
Trailing Stop = (EMA(Main chart,40)[1] + (0 * ConvertToRealPips("Current", 59.0)));
Trailing Stop Activation = -5000000 pips;
Exit After 40 bars;
}
//--------------------------------------------------------------------
// Trading rule: Short Entry (On Bar Open)
//--------------------------------------------------------------------
if (No Trade Recently Closed
and (Stochastic(Main chart,9, 3, 20).Slow%D[1] > 50))
{
// Action #1
Open Short order at (SMA(Main chart,2)[1] + (0.6 * BarRange(Main chart)[43])) Stop;
Order valid for 100 bars;
Stop Loss = 140 pips;
Profit target = 200 pips;
Trailing Stop = (EMA(Main chart,40)[1] + (0 * ConvertToRealPips("Current", 59.0)));
Trailing Stop Activation = -5000000 pips;
Exit After 40 bars;
}
//--------------------------------------------------------------------
// Trading rule: Long Exit (On Bar Open)
//--------------------------------------------------------------------
if ((MarketPosition("Current", MagicNumber, "") is Long))
{
}
//--------------------------------------------------------------------
// Trading rule: Short Exit (On Bar Open)
//--------------------------------------------------------------------
if ((MarketPosition("Current", MagicNumber, "") is Short))
{
}
Thanks,
Mike
In old SQ, a non-standard implementation was used and it was the same algorithm as in a built-in metatrader Stochastic indicator.
In SQX we've decided to use standardized implementations of indicators. If you need to get the same results as in SQ3, you would have to add a new Java snippet of Stochastic indicator using the old agorithm.