TrendSpider leverages OpenAI® technology in order to allow traders to create Visual Script conditions by typing simple sentences in plain English, instead of building them by clicking through menus. In example, one can type price above sma 200
and it will be automatically converted into a structured condition which will be identical to what one could build via our visual editor.
What are GPT Conditions
GPT Condition is a tool which allows you to define a script criteria using human language. Once done, TrendSpider uses the OpenAI® GPT technology to convert this written condition into a formal structure recognized by TrendSpider.
How to create a GPT Condition
In any place where there's a Visual Script editor (i.e., Strategy Tester, Scanner, Visual Scripts Manager e.t.c.), you can add a GPT Condition by clicking on a add a GPT condition
link.
Each GPT Condition converts one line of a text into one line of a Visual Script. You can verify whether your input had been interpreted right by checking the resulting structured condition. Each GPT Condition normally has a structure like OPERAND1 OPERATION OPERAND2
— i.e., in sma 20 > ema 50
sma 20
is first operand, then >
(greater than) is the operator and ema(50)
is the second operand.
Mastering GPT Conditions
GPT Conditions are powered by a language model, which means that it can do a good job tolerating typos, unclear instructions or ambiguous input. The best way for you to figure out how to talk to it is as follows: first, check the Examples section below, and second, play with it and experiment.
How specific you should be. You can be as specific as sma(20) greater than Bollinger Bands(20) Top
or as brief as sma 20 > bbands top
or even price cross up sma
. GPT Conditions will do its best figuring out your intention and then fill the missing data with reasonable defaults (which you can then adjust using the Visual Script Editor).
Format for indicator inputs. Indicator inputs can be recognized in a broad range of formats, but normally INDICATOR ARG1 ARG2...
(i.e, sma 20
or bbands 20 4
) or INDICATOR(ARG1, ARG2, ...)
(i.e. ,bbands(20, 3.5)
) are safe bets.
Format for time frames. Be verbose when specifying time frames. I.e., prefer 5 min
over 5
, daily
over D
etc. Example: 5 min sma 20 cross up daily sma 200
.
What if it does not understand you. In case if you can't get it doing what you wanted, consider making your requests more specific and provide more context. Consider providing additional details. In the end, the only thing GPT Conditions have is whatever you type in. I.e., high > previous high
might not work the way you wanted, but high > previous candle high
will.
Examples
The range of acceptable inputs is wide and can not be defined strictly. Experimenting is the best way for finding your own way. Here's a list of examples, which is just as source for your inspiration.
price touched sma 51
rsi above 70
sma 20 > sma 50
ichimoku signals buy
(take it with a grain of salt)ema death cross
thestrat is 2u
seq count is 9
high > previous candle high
price above sma 200
rsi crossed up 70
candle low below bollinger high
relative volume above 3.5
rel vol above 3.5
rvol > 3.5
5 min sma cross up 10 min bbands top
Limitations
- GPT Conditions are currently only supporting using price action and top 150 most popular indicators. Candle patterns, chart patterns and other types of data supported by Visual Scripts currently can not be interpreted by GPT Conditions.
- "Within X% from" operator is not supported
- "By at least X%" is not supported