Skip to content

Writing Requests

A useful request explains what the program must do in terms you can later test. Write a short specification rather than a string of indicator names. Include the symbol and timeframe assumptions, the conditions for a signal and the action that follows. If a rule is intentionally absent, say so instead of relying on Xen to choose a default.

For existing code, explain the change and what already works. “Add a spread filter without changing entries or sizing” gives a clearer boundary than “improve this EA”. Make interacting changes in stages and test each returned file before requesting the next feature.

Describe the signal precisely

Explain whether entries use completed candles or the forming candle. For a crossover, state which values must cross and which bars are compared. Mention whether one signal can produce only one entry, whether both directions are allowed and what happens when an opposite signal appears while a position is open.

For example: “Create an EA for the chart symbol and timeframe. Buy once when the 20-period EMA crosses above the 50-period EMA on completed bars; sell on the reverse crossover. Evaluate on a new bar and allow one EA-managed position at a time.” This establishes signal timing and repeated-entry rules before exits and sizing are added.

Specify money and order rules

Continue the example with exact units: “Use a fixed 0.10-lot volume, a 200-point stop and a 400-point target. Ignore entries when spread exceeds 30 points. Manage only positions belonging to this EA's magic number.” Points, pips, price distance and account currency are different units, so choose the one you mean.

For percentage risk, specify the percentage, balance or equity basis and how stop distance is calculated. Include broker-time sessions, trailing stops, break-even triggers or daily limits when they belong in the design. Explain the intended netting or hedging behaviour if managing several positions matters. State whether a session ending prevents entries or also closes existing trades.

Give an indicator a testable definition

Describe the calculation and what appears on the chart: lines, arrows, colours, a separate window or text. Give default inputs, the bars used and when alerts fire. If a signal is confirmed several candles later, distinguish when it becomes known from the candle where its marker is drawn.

A screenshot helps with layout, but cannot establish calculation periods, buffer values or historical signal stability. Accompany it with those rules in text. Use Prompt Builder and Build Plans when important design decisions need to be settled before generation.