Home › Forums › Trading System Mentor Course Community › AmiBroker Coding and AFL › AFL Template & Looping Reference Library
- This topic is empty.
-
AuthorPosts
-
February 5, 2016 at 12:36 am #101422Nick RadgeKeymaster
Post and share any AFL templates you’ve created herein for the benefit of other members.
Feel free to add anything new, something we’ve missed or something you can do better.
February 5, 2016 at 1:04 am #102774Nick RadgeKeymasterHistorical Database Template
Code:_SECTION_BEGIN(“Historical Data Base Testing”);
//=================================================================================
//Historical Data Base Testing
//=================================================================================
ASXList = ParamList(“ASX Historical Watchlist:”,”1: Off|2: ASX 20|3: ASX 50|4: ASX 100|5: ASX 200|6: ASX 300|7: ASX All Ordinaries|8: ASX Small Ordinaries|9: ASX Emerging Companies|10: Excluding ASX 300″,0);if(ASXList == “1: Off”) HistDB = 1;
if(ASXList == “2: ASX 20”) HistDB = IsIndexConstituent(“$XTL”);
if(ASXList == “3: ASX 50”) HistDB = IsIndexConstituent(“$XFL”);
if(ASXList == “4: ASX 100”) HistDB = IsIndexConstituent(“$XTO”);
if(ASXList == “5: ASX 200”) HistDB = IsIndexConstituent(“$XJO”);
if(ASXList == “6: ASX 300”) HistDB = IsIndexConstituent(“$XKO”);
if(ASXList == “7: ASX All Ordinaries”) HistDB = IsIndexConstituent(“$XAO”);
if(ASXList == “8: ASX Small Ordinaries”) HistDB = IsIndexConstituent(“$XSO”);
if(ASXList == “9: ASX Emerging Companies”) HistDB = IsIndexConstituent(“$XEC”);
if(ASXList == “10: Excluding ASX 300”) HistDB = IsIndexConstituent(“$XKO”)==0;//———————————————————————————
USList = ParamList(“US Historical Watchlist:”,”1: Off|2: Russell 1000|3: Russell 2000|4: Russell 3000|5: NASDAQ 100|6: Dow Jones Industrial Average|7: S&P 500|8: S&P 100|9: S&P MidCap 400|10: S&P SmallCap 600|11: S&P 1500|12: Russell MicroCap|13: Russell MidCap”,0);if(USList == “1: Off”) USHistDB = 1;
if(USList == “2: Russell 1000”) USHistDB = IsIndexConstituent(“$RUI”);
if(USList == “3: Russell 2000”) USHistDB = IsIndexConstituent(“$RUT”);
if(USList == “4: Russell 3000”) USHistDB = IsIndexConstituent(“$RUA”);
if(USList == “5: NASDAQ 100”) USHistDB = IsIndexConstituent(“$NDX”);
if(USList == “6: Dow Jones Industrial Average”) USHistDB = IsIndexConstituent(“$DJI”);
if(USList == “7: S&P 500”) USHistDB = IsIndexConstituent(“$SPX”);
if(USList == “8: S&P 100”) USHistDB = IsIndexConstituent(“$OEX”);
if(USList == “9: S&P MidCap 400”) USHistDB = IsIndexConstituent(“$MID”);
if(USList == “10: S&P SmallCap 600”) USHistDB = IsIndexConstituent(“$SML”);
if(USList == “11: S&P 1500”) USHistDB = IsIndexConstituent(“$SP1500”);
if(USList == “12: Russell MicroCap”) USHistDB = IsIndexConstituent(“$RUMIC”);
if(USList == “13: Russell MidCap”) USHistDB = IsIndexConstituent(“$RMC”);//———————————————————————————
HDBFilter = HistDB AND USHistDB;//=================================================================================
_SECTION_END();February 5, 2016 at 1:07 am #102775Nick RadgeKeymasterIndex Filter Code
Code:_SECTION_BEGIN (“Index Filter”);
//=================================================================================
//Index Filter
//=================================================================================
IndexTog = ParamToggle(“Index Filter:”,”Off|On”);
“”;
“Index Filter”;
IndexCode = ParamStr(“Index Symbol”,”$XAO.asx”);
Index = Foreign(IndexCode,”C”);
IndMA = Param(“Index MA”,50,1,200,1);IndFiltUp = Index > MA(Index,IndMA);
IndFiltL = IIf(IndexTog,IndFiltUp,1);//=================================================================================
_SECTION_END();February 5, 2016 at 1:08 am #102776Nick RadgeKeymasterPrice and Volume Filters
Code:_SECTION_BEGIN (“Optional Price & Volume Filters”);
//=====================================================
//Optional Price & Volume Filters
//=====================================================
PriceTog = ParamToggle(“Price Filter”,”On|Off”);
MinSP = Param(“Minimum Share Price – $”,0.20,0.00,1000,0.01);
MaxSP = Param(“Maximum Share Price – $”,100,0.00,1000,0.01);
MinMaxSP = C >= MinSP AND C <= MaxSP; PriceFilt = IIf(PriceTog,MinMaxSP,1); //--------------------------------------------------------------------------------- TOTog = ParamToggle("Turnover Filter","Off|On"); Turnover = C*V; MinTO = Param("Minimum Turnover - $",300000,0,10000000,1000); TOMA = Param("Turnover MA",5,1,200,1); AveTO = MA(Turnover,TOMA); TOFilter = AveTO > MinTO AND Turnover > MinTO;
TOFilt = IIf(TOTog,TOFilter,1);
//———————————————————————————
VolTog = ParamToggle(“Volume Filter”,”Off|On”);
MinVol = Param(“Minimum Volume”,300000,0,10000000,1000);
VolFilter = Volume > MinVol;
VolFilt = IIf(VolTog,VolFilter,1);
//———————————————————————————
AveVolTog = ParamToggle(“Average Volume Filter”,”Off|On”);
MinAveVol = Param(“Minimum Average Volume”,300000,0,10000000,1000);
AVPer = Param(“Volume EMA”,7,1,200,1);
AveVol = EMA(V,AVPer) > MinAveVol;
AveVolFilt = IIf(AveVolTog,AveVol,1);
//———————————————————————————
OptFilt = PriceFilt AND TOFilt AND VolFilt AND AveVolFilt;//====================================================
_SECTION_END();February 5, 2016 at 2:29 am #102777LeeDanelloParticipantBest we save these as snippets
February 9, 2016 at 11:27 pm #102778Stephen JamesMemberProfit Target Looping
Code:Buy = 0;
Sell = 0;
LStop = Null;
PriceAtBuy = 0;
LBIT = 0;
ProfitTarget = Null;for (j = 1; j < BarCount; j++) { if (PriceAtBuy==0 AND LE[j]) { Buy[j] = True; BuyPrice[j] = Open[j]; PriceAtBuy = BuyPrice[j]; LStop[j] = Max(TrailStop[j-1],TrailStop[j]); LStop[j-1] = TrailStop[j-1]; ProfitTarget[j] = PriceAtBuy*1.2; LBIT[j] = 1; if (LBIT[j]==1 AND L[j] <= LStop[j-1])//low breaches the stop price set yesterday { Sell[j] = True; SellPrice[j] = Min(Open[j],LStop[j-1]);//accounts for an opening gap down PriceAtBuy = 0; } } else if (PriceAtBuy > 0)
{
LBIT[j] = LBIT[j-1]+1;if (LBIT[j]>1)
{
LStop[j] = Max(LStop[j-1],TrailStop[j]);
ProfitTarget[j] = ProfitTarget[j-1];//forms an array in the same manner as trail stop
}if (LBIT[j]>1 AND H[j] >= ProfitTarget[j-1])//high breaches profit target
{
Sell[j] = True;
SellPrice[j] = Max(Open[j],ProfitTarget[j-1]);//accounts for opening gap higher
PriceAtBuy = 0;
}if (LBIT[j]>1 AND L[j] <= LStop[j-1]) { Sell[j] = True; SellPrice[j] = Min(Open[j],LStop[j-1]); PriceAtBuy = 0; } } }
February 9, 2016 at 11:35 pm #102780Stephen JamesMemberASX Tick Sizes
Code:TS = IIf(C < 0.10, 0.001, IIf(C < 2.00, 0.005, 0.01));February 9, 2016 at 11:42 pm #102779Nick RadgeKeymasterLinear Regress Slope (Andreas Clenow “Stock on the Move”
Code:LogOfPrice = ln( C );
ExponentialSlope = LinRegSlope( LogOfPrice, LookbackTimeframe );
AnnualizedSlope = 100 * ( ( exp( ExponentialSlope ) ) ^ 250 – 1 );
R2 = Correlation( LogOfPrice, BarIndex(), LookbackTimeframe ) ^ 2;
AdjustedSlope = IIf( InIndex, AnnualizedSlope * R2, Null );February 9, 2016 at 11:44 pm #102781Stephen JamesMemberPosition Sizing Options – Long and Short system
Code:LRiskAmnt = P – LIS; //Price minus Long Initial stop
SRiskAmnt = SIS – P; //Short Initial stop minus Price
“”;
“Position Sizing Method:”;
PosSizeMethod = ParamList(“Position Sizing Method:”,”Fixed Fractional Risk %|Fixed $ Risk Amount|Fixed $ Total Position Size|Fixed % of Portfolio Equity”,0);//Fixed Fractional Risk Percentage
Risk1Pcnt = Param(“Fixed Fractional Risk %”,1,0.01,5,0.01);
Risk1 = IIf(Buy,Risk1Pcnt*Ref(P,-1)/Ref(LRiskAmnt,-1),Risk1Pcnt*Ref(P,-1)/Ref(SRiskAmnt,-1));
//Fixed $ Risk Amount
Risk2Amnt = Param (“Fixed $ Risk Ammount”,1000,1,100000,100);
Risk2 = IIf(Buy,Risk2Amnt*Ref(P,-1)/Ref(LRiskAmnt,-1),Risk2Amnt*Ref(P,-1)/Ref(SRiskAmnt,-1));
//Fixed $ Position Size
FDAmount = Param (“Fixed $ Total Position Size”,5000,100,100000,100);
//Fixed % of Portfolio Equity
FPAmount = Param(“Fixed % of Portfolio Equity”,5,1,100,1);if(PosSizeMethod == “Fixed Fractional Risk %”) SetPositionSize(Risk1,spsPercentOfEquity);
if(PosSizeMethod == “Fixed $ Risk Amount”) SetPositionSize(Risk2,spsShares);
if(PosSizeMethod == “Fixed $ Total Position Size”) SetPositionSize(FDAmount,spsValue);
if(PosSizeMethod == “Fixed % of Portfolio Equity”) SetPositionSize(FPAmount,spsPercentOfEquity);February 9, 2016 at 11:47 pm #102782Stephen JamesMemberBreakeven Trail Stop looping
Code:Buy = 0;
Sell = 0;
LStop = Null;
PriceAtBuy = 0;
LBIT = 0;
BELevel = Null; //initiated to Nullfor (j = 1; j < BarCount; j++) { if (PriceAtBuy==0 AND LE[j]) { Buy[j] = True; BuyPrice[j] = Open[j]; PriceAtBuy = BuyPrice[j]; LStop[j] = Max(TrailStop[j-1],TrailStop[j]); LStop[j-1] = TrailStop[j-1]; BELevel[j] = PriceAtBuy; //assign PriceAtBuy which contains the BuyPrice to the array LBIT[j] = 1; if (LBIT[j]==1 AND L[j] <= LStop[j-1]) { Sell[j] = True; SellPrice[j] = Min(Open[j],LStop[j-1]); PriceAtBuy = 0; } } else if (PriceAtBuy > 0)
{
LBIT[j] = LBIT[j-1]+1;if (LBIT[j]>1)
{
LStop[j] = Max(LStop[j-1],TrailStop[j]);
BELevel[j] = BELevel[j-1]; //continuation of the array
}if (LBIT[j]>1 AND Close[j] > (BELevel[j-1]*1.1)) //condition to move stop to BE
{
LStop[j] = Max(LStop[j],BELevel[j-1]); //stop reset to continue higher
}if (LBIT[j]>1 AND L[j] <= LStop[j-1]) { Sell[j] = True; SellPrice[j] = Min(Open[j],LStop[j-1]); PriceAtBuy = 0; } } }
March 2, 2016 at 11:55 pm #102783Stephen JamesMemberTemplate for an ‘n’ Bar Exit (or stale exit). Designed to use with other exits so FlagExit can be used for the exploration and plotting of exit signals.
Code:ExitBars = Param(“# Exit Bars”,5,2,100,1);//=================================================================================
//Looping
//=================================================================================
Buy = 0;
Sell = 0;
PriceAtBuy = 0;
LBIT = 0;
FlagExit = 0;
//=================================================================================
for (j = 1; j < BarCount; j++) { if (PriceAtBuy==0 AND LE[j]) { Buy[j] = True; PriceAtBuy = LEPrice[j]; BuyPrice[j] = LEPrice[j]; LBIT[j] = 1; } else if (PriceAtBuy > 0)
{
LBIT[j] = LBIT[j-1]+1;if (LBIT[j] == ExitBars)
{
FlagExit[j] = True;
}if (LBIT[j] > ExitBars)
{
Sell[j] = True;
SellPrice[j] = Open[j];
PriceAtBuy = 0;
}
}
}March 3, 2016 at 4:04 am #102784Stephen JamesMemberRounded tick sizes for ASX (US can just use 0.01 for tick) for Buy Limit Orders. Other rounding options are ‘floor’ or ‘ceiling’ (search user guide).
Code:Tick = IIf(OrderPrice<0.10,0.001,IIf(OrderPrice<2.00,0.005,0.01));
BuyLimVal = round(OrderPrice/Tick);
BuyLimit = BuyLimVal * Tick;April 26, 2016 at 10:41 pm #102912Stephen JamesMemberLooping template with line by line explanation
Code://=====================================================================
//Looping
//=====================================================================
Buy = 0; //Initialised to zero as no position active yet
Sell = 0; //Initialised to zero as no position active yet
PriceAtBuy = 0; //Holds BuyPrice in the looping – set to zero to start as no position active yet
LBIT = 0; //Long Bars In Trade – becomes a bar counter while position is active
LStop = Null; //Used for a trail stop. Initialised to Null (empty) so it only plots when a position is on
//Initialising to zero would have the stop starting at zero and plotting on all bars.
//———————————————————————for (j = 1; j < BarCount; j++) //loop through all bars { //opening brace for section 1 if (PriceAtBuy==0 AND LE[j]) //LE (trigger bar) is true { //opening brace for section 2 Buy[j] = True; //Buy initiated on this bar BuyPrice[j] = LEPrice[j]; //BuyPrice set as LEPrice which is an identifier set in general code - eg a buy limit level. PriceAtBuy = LEPrice[j]; //PriceAtBuy now holds the buy price - note: no bar reference on PriceAtBuy LStop[j] = Max(TrailStop[j-1],TrailStop[j]); //trail stop is set to only go up LStop[j-1] = TrailStop[j-1]; //trail stop starts from setup bar when orders are determined LBIT[j] = 1; //barcounter starts at this bar if (LBIT[j]==1 AND L[j] <= LStop[j-1]) //Trail stop that may exit on same bar as entry. { //opening brace for section 3 Sell[j] = True; //Sell is true on this bar SellPrice[j] = Min(Open[j],LStop[j-1]); //Sell Price is the minimum of the Open at last bar or the trail stop level on bar before PriceAtBuy = 0; //variable reset to zero as no longer a position active } //closing brace for section 3 } //closing brace for section 2 else //if the previous section was not true then this if (PriceAtBuy > 0) //variable above zero so a position still open
{ //opening brace for section 4
LBIT[j] = LBIT[j-1]+1; //bar counter increments by 1if (LBIT[j]>1)
{ //opening brace for section 5
LStop[j] = Max(LStop[j-1],TrailStop[j]); //trail stop set to always go up
} //closing brace section 5if (LBIT[j]>1 AND L[j] <= LStop[j-1]) //check for exits again { //opeing brace section 6 Sell[j] = True; //Sell is true on this bar SellPrice[j] = Min(Open[j],LStop[j-1]); //Sell Price is the minimum of the Open at last bar or the trail stop level on bar before PriceAtBuy = 0; //variable reset to zero as no position } //closing brace for section 6 } //closing brace for section 4 } //closing brace for section 1
June 2, 2016 at 11:03 am #102785LeeDanelloParticipantEnhanced Profit Table
Code:EnableTextOutput( 3 ); // enable HTML output into report (Version 5.84 or higher!)function CalendarDays()
{
ddsince1900 = DaysSince1900();
result = ddsince1900 – ddsince1900[0];
return result;
}// — MaxDD —
EQ = C;
MaxEQ = Highest( EQ );
DD = EQ – MaxEQ;
MaxDD = Lowest( DD );
DDpct = 100 * ( EQ – MaxEQ ) / MaxEQ;
MaxDDpct = Lowest( DDpct );// — CAR —
bi = BarIndex();
fbr = Status( “firstbarinrange” );
lbr = Status( “lastbarinrange” );
fbrbi = LastValue( ValueWhen( fbr, bi ) );
lbrbi = LastValue( ValueWhen( lbr, bi ) );
cd = CalendarDays();
Days = cd[ lbrbi ] – cd[ fbrbi ];
CAR = 100 * ( ( eq / eq[ fbrbi ] ) ^ ( 365 / Days ) – 1 );fillText = StrFormat( ” “);
Title = StrFormat( “Equity = $ %.2f%%, CAR = %.2f%%, MaxDD = $ %.2f%%, (= %.2f%%)”, EQ, CAR, MaxDD, MaxDDpct );
SetGradientFill( colorDarkGreen, ColorRGB( 0, 204, 0 ), 0 );
Plot( EQ, “Portfolio Equity”, colorDarkGreen, styleGradient | styleLine );
// — drawdown trenches in red —
PlotOHLC( MaxEQ, MaxEQ, EQ, MaxEQ, “”, colorRed, styleCloud );// — paint log graph —
SetChartOptions( 2, chartLogarithmic );////////////////////////////////////////////////////////////////////////////
////////////////////////////
// From: 3. Profit Table.afl
////////////////////////////yr = Year();
mo = Month();YearChange = yr != Ref( yr, 1 );
MonChange = mo != Ref( mo, 1 );FirstYr = 0;
LastYr = 0;startbar = 0;
////////////////////////////
// SKIP non-trading bars
////////////////////////////for ( i = 0; i < BarCount; i++ ) { if ( eq[ i ] ) { startbar = i; break; } } //////////////////////////// // collect yearly / monthly changes in equity // into dynamic variables //////////////////////////// LastYrValue = eq[ startbar ]; LastMoValue = eq[ startbar ]; MaxYrProfit = MinYrProfit = 0; MaxMoProfit = MinMoProfit = 0; MaxYearEQ = YearDD = MaxYearDD = 0; for ( i = startbar + 1; i < BarCount; i++ ) { MaxYearEQ = Max( EQ[ i ], MaxYearEQ ); YearDD = Nz( 100 * ( EQ[ i ] - MaxYearEQ ) / MaxYearEQ ); MaxYearDD = Min( YearDD, MaxYearDD ); if ( YearChange[ i ] || i == BarCount - 1 ) { Chg = 100 * ( -1 + eq[ i ] / LastYrValue ); VarSet( "ChgYear" + yr[ i ], Chg ); MaxYrProfit = Max( MaxYrProfit, Chg ); MinYrProfit = Min( MinYrProfit, Chg ); if ( FirstYr == 0 ) FirstYr = yr[ i ]; LastYr = yr[ i ]; LastYrValue = eq[ i ]; VarSet("MaxYearDD"+ yr[ i - 1 ], MaxYearDD ); MaxYearEQ = YearDD = MaxYearDD = 0; } if ( MonChange [ i ] || i == BarCount - 1 ) { mon = mo[ i ]; Chg = 100 * ( -1 + eq[ i ] / LastMoValue ); VarSet( "ChgMon" + yr[ i ] + "-" + mon, Chg ); VarSet( "SumChgMon" + mon, Chg + Nz( VarGet( "SumChgMon" + mon ) ) ); VarSet( "SumMon" + mon, 1 + Nz( VarGet( "SumMon" + mon ) ) ); MaxMoProfit = Max( MaxMoProfit, Chg ); MinMoProfit = Min( MinMoProfit, Chg ); LastMoValue = eq[ i ]; } } MonthNames = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"; function GenProfitTableHTML( ) { printf( "
n” );
printf( “
n” ); Header = “Year,” + MonthNames + “,Yr%%,” + “MDD”;
for ( Col = 0; ( Colname = StrExtract( Header, Col ) ) != “”; Col++ )
{
printf( “” + Colname + “ ” );
}printf( “
n” );
for ( y = FirstYr; y <= LastYr; y++ ) { //Color = ColorRGB( IIf( row == 0 || col == 0 || col == 13, 220, 255 ), 255, IIf( row % 2, 255, 220 ) ); // new row if ( y % 2 ) printf( "
n ” );
else
printf( “n ” ); printf( “%g
“, y );
for ( m = 1; m <= 12; m++ ) { Chg = VarGet( "ChgMon" + y + "-" + m ); if ( NOT IsNull( Chg ) ) { if ( Chg >= 0 )
printf( “%.1f%% “, Chg );
else
printf( “%.1f%% “, Chg );
}
else
printf( “N/A ” );
}if ( y % 2 )
printf( “” );
else
printf( “” ); x = VarGet( “ChgYear” + y );
z = VarGet(“maxYearDD” + y );if ( x >= 0 )
printf( “%.1f%%“, x );
else
printf( “%.1f%%“, x );
Printf( “%.1f%% “, z );
printf( “n” ); // end row
}printf( “
n” ); // new row printf( “
Avg|Mx ” );
for ( m = 1; m <= 12; m++ ) { x = Nz( VarGet( "SumChgMon" + m ) / VarGet( "SumMon" + m ) ); if ( x >= 0 )
printf( “%.1f%% “, x );
else
printf( “%.1f%% “, x );
}
if ( CAR[ BarCount-1 ] >= 0 )
printf( “%.1f%% “, CAR[ BarCount-1 ] );
//PrintInCell( StrFormat(“%.1f”, CAR[ BarCount-1 ] ), Row, 13, ColorRGB( 255, 128, 0 ) );
else
printf( “%.1f%% “, CAR[ BarCount-1 ] );
//PrintInCell( StrFormat(“%.1f”, CAR[ BarCount-1 ] ), Row, 13, ColorRGB( 0, 204, 0 ) );
printf( “%.1f%% “, MaxDDpct[ BarCount-1 ] );
//PrintInCell( StrFormat(“%.1f”, MaxDDpct[ BarCount-1 ] ), Row, 14, ColorRGB( 255, 255, 0) );
//printf( “” );
printf( “
n” );
}
///////////////////////////
// This function checks if currently selected symbol
// is portfolio equity
//////////////////////////
function CheckSymbol()
{
if ( Name() != “~~~EQUITY” AND Name() != “~~~OSEQUITY” )
{
printf( “For accurate results switch to ~~~EQUITY symbol
” );
}
}CheckSymbol();
////////////////////////////
// Main program
////////////////////////////
GenProfitTableHTML();June 16, 2016 at 10:38 pm #104108Stephen JamesMemberExploration code for DDE or API speadsheets for Interactive Brokers – Entries only. Create one version for entries and another for open trades and exits.
Code:_SECTION_BEGIN (“Explorer”);
//=================================================================================
//DDE Exploration
//=================================================================================//DDE template example based on fixed % position sizing
//BuyLim = Buy Limit price
//LESetUp = setup bar after excess signals are dealt with – e.g. LESetup = (IIf(LBIT==0 OR Sell==1,BuySetUp,0));AccountBalance = Param(“Account Balance”,100000,1,1000000,1);
PercentRisk = Param(“Explorer: % Equity”,10,1,100,0.01);
NumOfShares = round((AccountBalance*PercentRisk/100)/BuyLim);SetOption(“NoDefaultColumns”,True);
Filter = LESetup;Width = 65;
Width1 = 75;
if(Status(“action”)==4)
{
SetSortColumns(1);
}
AddTextColumn(WriteIf(LESetup,”” + Name(),””),”Symbol”,1.3,29,55,90);
AddTextColumn(WriteIf(LESetup,”STK”,””),”Type”,1.3,29,55,80);
AddTextColumn(WriteIf(LESetup,””,””),”Expiry”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”Strike”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”P/C”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”Multiplier”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”Trading Class”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,”SMART”,””),”Exchange”,1.3,29,55,80);
AddTextColumn(WriteIf(LESetup,””,””),”Primary Exchange”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,”USD”,””),”Currency”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”Comb Legs”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”Leave This Empty”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,”BUY”,””),”Action”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””+NumOfShares,””),”Quantity”,1.0,29,55,Width);
AddTextColumn(WriteIf(LESetup,”LMT”,””),”Order Type”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””+BuyLim,””),”Lmt Price”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”Aux Price”,1.3,29,55,Width);
AddTextColumn(WriteIf(LESetup,””,””),”Ctrl”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””,””),”Id”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””,””),”Status”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””,””),”Filled”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””,””),”Remaining”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””,””),”Ave Fill Price”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””,””),”Last Fill Price”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,””,””),”Parent Id”,1.3,29,55,Width1);
AddTextColumn(WriteIf(LESetup,”DAY”,””),”Time in Force”,1.3,29,55,Width1);//=================================================================================
_SECTION_END(); -
AuthorPosts
- You must be logged in to reply to this topic.