CQG provides two trade system samples for you: cqg.AMASamp and cqg.StochSample.
AMA(@,ERPeriod,FastPeriod,SlowPeriod)[-1] XABOVE MA(@,Sim,MAPeriod)[-1]
The signal becomes true and initiates a long entry when yesterday’s Adaptive Moving Average crosses over the Simple Moving Average from yesterday.
Parameters have been configured for the studies AMA (ERPeriod, FastPeriod, SlowPeriod) and MA (MAPeriod). The parameters make changing the associated periods easier from the chart window. These parameters are available for the entire trade system, so they may be used in both entries AND exits.
To change the values for these parameters, right-click on the trade system as it is displayed on the chart and select "Modify..." The parameter names appear as column headers and the values are found under those headers.
The Order type for this Entry is a Market Order. This means that the Trade is executed at the Price specified in the Price tab when the Signal is true. The other order types include Stop, Limit and S/L (Stop/Limit).
The Allow multiple entries before exit (Pyramids) is fairly self-explanatory--it allows additional entry trades to be placed if the condition for that entry is hit before the exit condition is met.
The Allow entry on exit allows an entry to be placed on the same bar that is an exit for a previous trade(s). This is especially useful for Stop-and-Reverse systems.
cqg.AMASamp Price
Open(@): The price used for the trade is today’s open as the signal happened yesterday.
cqg.AMASamp Size
In this sample, the trade system trades 7 contracts. This field could also be a formula evaluating the number of contracts based on market conditions.
B.cqg.StochXAbove(@,XUpThreshold,SSKPeriod)
This System relies on the condition cqg.StochXAbove and cqg.StochXBelow. It is a reverse type system. That is, when it exits a long it also enters a Short and vice-versa. The Threshold values and SSK Period are parameters that may be optimized.
The orders in this system are all signal based.
cqg.StochSample Price: Close(@)
cqg.StochSample Size: 1