SetPeg (Reserved Word)
Enables or disables the ”Peg” advanced order feature.
No validation of orders will be done. Any incorrect combination will result in the trade server rejecting the order.
Usage
SetPeg(iPegType)
Return
None
Inputs
iPegType may be one of the following constants: pegBest, pegMid, pegDisabled. If pegDisabled is passed the ”Peg” setting is disabled otherwise ”Peg” is enabled.
These are the EasyLanguage constants and their values to pass into SetPeg, they are defined as follows:
0 = PegDisable (Disable Peg Feature)
1 = PegBest (Best Bid for a Buy, Best Ask for a Sell Short)
2 = PegMid (Mid Price for both Buy and Sell Short)
Example
A limit order to buy and Peg at best bid up to the InsideBid plus .10:
if lastbaronchart then begin
SetPeg(pegBest);
Buy next bar at InsideBid +.10 Limit;
end;
A limit order to buy and Peg at mid price up to the InsideBid plus .10:
if lastbaronchart then begin
SetPeg(pegMid);
Buy next bar at InsideBid +.10 Limit;
end;