Super systems but I need help

#1
It is very useful system and i want to make explore but i can not do it. Please help me!


/*************************************************
SPI Pivot System - Based On Brent Penfold's
Trading the SPI ...
**************************************************/

SetOption("InitialEquity", 10000 );
SetOption("FuturesMode", True);
SetOption("Allowsamebarexit", True );
SetOption("CommissionMode",5); // $ per trade
SetOption("CommissionAmount",0); //$10 per side

RoundLotSize = 1;
MarginDeposit = -1;
SetPositionSize( 25, spsShares );

WeekH = TimeFrameGetPrice("H", inWeekly, -1); // last weeks high
WeekL = TimeFrameGetPrice("L", inWeekly, -1); // low
WeekC = TimeFrameGetPrice("C", inWeekly, -1); // close

WPP = ( WeekH + WeekL + WeekC ) / 3; // Weekly pivot point
DPP = (Ref(H,-1) + Ref(L,-1) + Ref(C,-1)) / 3; // Daily pivot
DRange = (Ref(H,-1) - Ref(L,-1)); // High Low Range
DR1 = DPP + DRange / 2; // Resistance point
TR = Max(Ref(H,-1),Ref(C,-2))-Min(Ref(C,-2),Ref(L,-1));

Buy = O < WPP // Lower than weekly pivot point
AND O > DR1 // Higher than Daily High
AND H > O + TR / 2; // Range expansion
BuyPrice = O + TR / 2;

StoppedOut = Buy==1 AND (BuyPrice-L) > 0.05 * Ref(C,-1); // Stopped out at 1% of yesterdays close
NormalSell = Ref(Buy,3) == 1; // Sell today if bought yesterday

Sell = StoppedOut OR NormalSell;
SellPrice = IIf(StoppedOut, BuyPrice - 0.01 * Ref(C,-1), O ); // Sell on open if not stopped out

Short = Cover = 0; // Long only system

SPI_status= WriteIf(Buy, "Al", WriteIf(Sell, "Sat", "N/A"));
SPI_Col=IIf(Buy, colorBlue, IIf(Sell, colorRed, colorLightGrey));

AddColumn(C, "Close", 1.2, IIf(C > Ref(C,-1), colorGreen, colorRed));
AddColumn(ADX(14),"ADX",1.2,IIf(ADX(14) > Ref(ADX(14),-1), colorGreen, colorRed));
AddTextColumn(SPI_status, "SPI", 1, colorWhite, SPI_Col);
 
#2
I don't feel this is very useful system. However, as per your requirement i have modified this afl with exploration , buy & sell arrow and plotting as indicator with scan & exploration facility. Pl, copy & paste.






SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );


/*************************************************
SPI Pivot System - Based On Brent Penfold's
Trading the SPI ...
**************************************************/

SetOption("InitialEquity", 10000 );
SetOption("FuturesMode", True);
SetOption("Allowsamebarexit", True );
SetOption("CommissionMode",5); // $ per trade
SetOption("CommissionAmount",0); //$10 per side

RoundLotSize = 1;
MarginDeposit = -1;
SetPositionSize( 25, spsShares );

WeekH = TimeFrameGetPrice("H", inWeekly, -1); // last weeks high
WeekL = TimeFrameGetPrice("L", inWeekly, -1); // low
WeekC = TimeFrameGetPrice("C", inWeekly, -1); // close

WPP = ( WeekH + WeekL + WeekC ) / 3; // Weekly pivot point
DPP = (Ref(H,-1) + Ref(L,-1) + Ref(C,-1)) / 3; // Daily pivot
DRange = (Ref(H,-1) - Ref(L,-1)); // High Low Range
DR1 = DPP + DRange / 2; // Resistance point
TR = Max(Ref(H,-1),Ref(C,-2))-Min(Ref(C,-2),Ref(L,-1));

Buy = O < WPP // Lower than weekly pivot point
AND O > DR1 // Higher than Daily High
AND H > O + TR / 2; // Range expansion
BuyPrice = O + TR / 2;

StoppedOut = Buy==1 AND (BuyPrice-L) > 0.05 * Ref(C,-1); // Stopped out at 1% of yesterdays close
NormalSell = Ref(Buy,3) == 1; // Sell today if bought yesterday

Sell = StoppedOut OR NormalSell;
SellPrice = IIf(StoppedOut, BuyPrice - 0.01 * Ref(C,-1), O ); // Sell on open if not stopped out

Short = Cover = 0; // Long only system

PlotShapes(shapeUpArrow*Buy,colorGreen,0,L,-15);
PlotShapes(shapeDownArrow*Sell,colorRed,0,H,-15);

SPI_status= WriteIf(Buy, "Al", WriteIf(Sell, "Sat", "N/A"));
SPI_Col=IIf(Buy, colorBlue, IIf(Sell, colorRed, colorLightGrey));

AddColumn(C, "Close", 1.2, IIf(C > Ref(C,-1), colorGreen, colorRed));
AddColumn(ADX(14),"ADX",1.2,IIf(ADX(14) > Ref(ADX(14),-1), colorGreen, colorRed));
AddTextColumn(SPI_status, "SPI", 1, colorWhite, SPI_Col);


Filter= Buy OR Sell;
 

Similar threads