Witam
Na to wygląda. Poniżej zamieszczam pseudo code strategii.
Kod: Zaznacz cały
//--------------------------------------------------------------------
// Pseudo Source Code of eurusd1heurusd1hStrategy 0.7056810524m24m
//
// Generated by StrategyQuant X Build 121 for MetaTrader
// at 05/15/2019 08:04
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// Strategy Parameters
//--------------------------------------------------------------------
int MagicNumber = 11111;
Main chart = Current Symbol / Current TF
//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------
LongEntrySignal = Aroon(Main chart,50).Up crosses below Aroon Down;
ShortEntrySignal = Aroon(Main chart,50).Up crosses above Aroon Down;
LongExitSignal = false;
ShortExitSignal = false;
//--------------------------------------------------------------------
// Trading rule: Long entry (On Bar Open)
//--------------------------------------------------------------------
if LongEntrySignal
{
// Action #1
Open Long order at (Highest(Main chart, 40)[2] + (0.50 * MTATR(Main chart,50)[1])) Stop;
Order valid for 141 bars;
Duplicate trades - disabled
Replacing pending orders - disabled
Stop Loss = 1.5* ATR(20);
Trailing Stop = 3.1* ATR(45), TS Activation at 1.3* ATR(170);
Exit After 9 bars;
}
//--------------------------------------------------------------------
// Trading rule: Short entry (On Bar Open)
//--------------------------------------------------------------------
if (ShortEntrySignal
and Not LongEntrySignal)
{
// Action #1
Open Short order at (Lowest(Main chart, 40)[2] - (0.5 * MTATR(Main chart,50)[1])) Stop;
Order valid for 141 bars;
Duplicate trades - disabled
Replacing pending orders - disabled
Stop Loss = 1.5* ATR(20);
Trailing Stop = 3.1* ATR(45), TS Activation at 1.3* ATR(170);
Exit After 9 bars;
}
//--------------------------------------------------------------------
// Trading rule: Long exit (On Bar Open)
//--------------------------------------------------------------------
if ((LongExitSignal
and Not LongEntrySignal)
and (MarketPosition("Any", MagicNumber, "") is Long))
{
// Action #1
Close Full position for Symbol = Any and Magic Number = MagicNumber;
}
//--------------------------------------------------------------------
// Trading rule: Short exit (On Bar Open)
//--------------------------------------------------------------------
if ((ShortExitSignal
and Not ShortEntrySignal)
and (MarketPosition("Any", MagicNumber, "") is Short))
{
// Action #1
Close Full position for Symbol = Any and Magic Number = MagicNumber;
}
Wskaźnik ma jedna fajną zaletę niezwiązana z samą strategia, ale która wykorzystuję. Aroon bada silę popytu i podaży. Jak jedna linia skierowana jest w górę a druga w dół to praktycznie zawsze mamy silny trend. Kiedy linie zbliżają się do siebie to rynek wpada w równowagę. Przecięcie się linii stanowi teoretycznie wybicie z tej równowagi. Na chwile obecna to działa....
Pozdrawiam