Name
C2TradingSignal — Prepare trading signals
Synopsis
C2TradingSignal
|
(SignalType,
|
| SigFilter = NULL, | |
| Price = NULL, | |
| Amount = NULL, | |
| PriceType = priceMarket, | |
| TypeOfSymbol = instrmntStock, | |
| Duration = tifDay, | |
| StopLoss = 0, | |
| ProfitTarget = 0, | |
| Delay = 0, | |
| Parkuntil = 0, | |
| RelativePrice, | |
| UserSignaId = 0, | |
| OcaId = 0, | |
| ReversalOrder = 0, | |
| TargetTIF = tifDay, | |
| CancelsAt = 0, | |
| CancelsAtRelative = 0, | |
Comment);
|
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| SignalType | number |
sigBTO, sigSTC, sigSTO or sigBTC |
|
| SigFilter | array | NULL |
if SigFilter == NULL then SigFilter = BarIndex() == LastValue[BarIndex()] |
| Price | array_or_number | NULL |
if NULL then determined from SignalType: BuyPrice, SellPrice, ShortPrice or CoverPrice |
| Amount | array_or_number | NULL |
if NULL then determined from SetPositionSize, which works with BuyPower instead of StartingCapital |
| PriceType | array_or_number | priceMarket |
priceMarket, priceLimit or priceStop |
| TypeOfSymbol | array_or_number | instrmntStock |
instrmntStock, instrmntForex, instrmntFuture or instrmntOption |
| Duration | array_or_number | tifDay |
tifDay or tifGTC |
| StopLoss | array_or_number | 0 |
Stop loss price |
| ProfitTarget | array_or_number | 0 |
Profit Target price |
| Delay | array_or_number | 0 | |
| Parkuntil | array_or_number | 0 | |
| RelativePrice | string | ||
| UserSignaId | array_or_number | 0 | |
| OcaId | array_or_number | 0 | |
| ReversalOrder | array_or_number | 0 | |
| TargetTIF | array_or_number | tifDay | |
| CancelsAt | array_or_number | 0 | |
| CancelsAtRelative | array_or_number | 0 | |
| Comment | string |
Description
This function prepares trading signals in Exploration.
Signals are visible on the Signals page then.
The C2TradingSignal command is based on Buy/Sell/Short/Cover variables content.
For example 'Sell To Open' signals are generated for those bars where the Short variable is TRUE.
If SigFilter = NULL then only signals for the last used Date bar are visible.
In other words: Signals defined by Buy/Sell/Short/Cover variables are further filtered by this SigFilter: SigFilter = BarIndex() == LastValue[BarIndex()].
If you want to see all generated 'Buy To Open' signals, set SigFilter = Buy.

