読み取り専用

フォーラムは現在、読み取り専用のアーカイブとなっています。.

バグ報告やプラットフォームに関する質問はこちら → [email protected]

私たちのコミュニティはDiscordとYouTubeで活動しています。ぜひ参加してください!

ご参加ください Discord YouTube

This is a template of a strategy, not a complete strategy

3件の返信

フィリップ・ファン・コラー

Customer, bbp_participant, community, 28 replies.

プロフィールを表示

11ヶ月前 #291596

こんにちは、,

I’m having issues with some of my custom block (I assume) not being able to generate the source code like Tradestation Easylanguage.

Please see strategy attached.
Also here is the pseudo code:

 

//——————————————————————–
// Pseudo Source Code of Strategy 0.38434
//
//   Generated by StrategyQuant X Build 142 for MetaTrader
//   at 10/14/2025 13:12
//
//   Backtested on @ES_SQ / M15, 2010.01.03 – 2020.12.31
//   Backtest engine: Tradestation
//——————————————————————–
//——————————————————————–
//  Strategy Parameters
//——————————————————————–
int MagicNumber = 11111;
int ATRPeriod1 = 14;
int RSICrossPeriod1 = 6;
double PriceEntryMult1 = 0.5;
double PriceEntryMult2 = 1.6;
int ATRPeriod2 = 20;
Main chart = Current Symbol / Current TF;
//——————————————————————–
// Trading options logic
//——————————————————————–
Don’t Trade On Weekends = false (Friday 0038 – Sunday 0038);
Exit at End Of Day = false (1600);
Exit On Friday = false (1530);
LimitSignalsTimeRange = false (0600 – 1400, Exit at End: false, Orders to close: All);
LimitMaxDistanceFromMarketPrice = false;   //Limit max distance
MaxDistanceFromMarketPct = 6;   //Max distance %
MaxTradesPerDay = 0;
Min SL: 0, Max SL: 0, Min PT: 0, Max PT: 0; // in ticks/pips, 0 means unlimited
//——————————————————————–
// Trading rule: Trading signals (On Bar Open)
//——————————————————————–
LongEntrySignal = ((((Low(Main chart)[1] – High(Main chart)[8]) < (ATR(Main chart,ATRPeriod1)[1] * 0.40))
   and CustomBlock:London(){((Bar Time[1] >= GetTime(2, 0, 0))
   and (Bar Time[1] < GetTime(11, 0, 0)))})
   and Candle pattern on Main chart 1 bars back is Doji);
ShortEntrySignal = false;
LongExitSignal = ((RSI(Main chart,RSICrossPeriod1, PRICE_CLOSE)[1] crosses above 80)
   or  CustomBlock:End of Week(){((Bar Day of Week[0] = Friday)
   and (Bar Time[0] >= GetTime(15, 30, 0)))});
ShortExitSignal = false;
//——————————————————————–
// Trading rule: Long entry (On Bar Open)
//——————————————————————–
if ((LongEntrySignal
   and Not ShortEntrySignal)
   and Not LongExitSignal)
{
    // アクション #1
    Open Long order at ((LowDaily(Main chart)[1] + (PriceEntryMult1 * (HighDaily(Main chart)[1] – LowDaily(Main chart)[1]))) + (PriceEntryMult2 * ATR(Main chart,ATRPeriod2)[1])) Stop;
        Duplicate trades: disabled;
        Replacing pending orders: allowed;
}
//——————————————————————–
// Trading rule: Short entry (On Bar Open)
//——————————————————————–
if ((ShortEntrySignal
   and Not LongEntrySignal)
   and Not ShortExitSignal)
{
    // アクション #1
    Open Short order at Market;
        Duplicate trades: disabled;
}
//——————————————————————–
// Trading rule: Long exit (On Bar Open)
//——————————————————————–
if (LongExitSignal
   and (MarketPosition(“Current”, MagicNumber, “”) is Long))
{
    // アクション #1
    Close Full position for Symbol = Current and Magic Number = MagicNumber;
}
//——————————————————————–
// Trading rule: Short exit (On Bar Open)
//——————————————————————–
if (ShortExitSignal
   and (MarketPosition(“Current”, MagicNumber, “”) is Short))
{
    // アクション #1
    Close Full position for Symbol = Current and Magic Number = MagicNumber;
}
Broker: No filter
添付ファイル:
に違いない ログインしました 添付ファイルを表示するには.

0

フィリップ・ファン・コラー

Customer, bbp_participant, community, 28 replies.

プロフィールを表示

11ヶ月前 #291599

The error:

0

フィリップ・ファン・コラー

Customer, bbp_participant, community, 28 replies.

プロフィールを表示

11ヶ月前 #291602

Image attached.

添付ファイル:
に違いない ログインしました 添付ファイルを表示するには.

0

フィリップ・ファン・コラー

Customer, bbp_participant, community, 28 replies.

プロフィールを表示

11ヶ月前 #291604

I was able to pinpoint the problem with OpenD() and CloseD() in one of my custom blocks.
Using those seems to cause the code generator to not work.

0

3件の返信を表示中 - 1 - 3件目 (全3件中)