Users who thanked for this post:
goso (18.01.2011), Mr. Moon (18.01.2011), Perfect Trader (18.01.2011)
|
|
Source code |
1 |
papp = ParamToggle("Plot all historical pivots","Off|On",1);
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
if(papp == 1 ){
PP = PP * (Day() == LastValue(Day()));
PP = IIf(PP,PP,Null);
R1 = R1 * (Day() == LastValue(Day()));
R1 = IIf(R1,R1,Null);
S1 = S1 * (Day() == LastValue(Day()));
S1 = IIf(S1,S1,Null);
R2 = R2 * (Day() == LastValue(Day()));
R2 = IIf(R2,R2,Null);
S2 = S2 * (Day() == LastValue(Day()));
S2 = IIf(S2,S2,Null);
R3 = R3 * (Day() == LastValue(Day()));
R3 = IIf(R3,R3,Null);
S3 = S3 * (Day() == LastValue(Day()));
S3 = IIf(S3,S3,Null);
}
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
_SECTION_BEGIN("pivots for multi time zones");
//by trash
SetBarsRequired(10000,10000);
Tick = IIf(StrRight(Name(),3)=="JPY" OR StrLeft(Name(),3)=="XAG" OR StrLeft(Name(),3)=="XAU", 0.01, 0.0001);
starttime = ParamTime("time shift","00:00");
endtime = 235900;
starttime2 = 000000;
endtime2 = starttime-000100;
tn = TimeNum();
timecond = tn >= starttime AND tn <= endtime;
timecond2 = tn >= starttime2 AND tn <= endtime2;
firstBarOfDay = deFlagFirstBarOfDay( starttime );
firstBarOfDay2 = deFlagFirstBarOfDay( starttime2 );
myHigh = ValueWhen(timecond, HighestSince(firstBarOfDay,High));
myHigh2 = ValueWhen(timecond2, HighestSince(firstBarOfDay2,High));
myLow = ValueWhen(timecond, LowestSince(firstBarOfDay,Low));
myLow2 = ValueWhen(timecond2, LowestSince(firstBarOfDay2,Low));
myClose = ValueWhen(timecond2, Close);
DH = TimeFrameCompress(myHigh, inDaily, compressLast);
DH2 = TimeFrameCompress(myHigh2, inDaily, compressLast);
DL = TimeFrameCompress(myLow, inDaily, compressLast);
DL2 = TimeFrameCompress(myLow2, inDaily, compressLast);
DC = TimeFrameCompress(myClose, inDaily, compressLast);
DH = TimeFrameExpand(Ref(DH,-1),inDaily,expandFirst);
DH2 = TimeFrameExpand(Ref(DH2,-0),inDaily,expandFirst);
DL = TimeFrameExpand(Ref(DL,-1),inDaily,expandFirst);
DL2 = TimeFrameExpand(Ref(DL2,-0),inDaily,expandFirst);
DayC0 = TimeFrameExpand(Ref(DC,-0),inDaily,expandFirst);
DayC = TimeFrameGetPrice("C", inDaily, -1);
DayH = IIf(starttime == 000000, DH, IIf(DH>DH2,DH,DH2));
DayL = IIf(starttime == 000000, DL, IIf(DL<DL2,DL,DL2));
DayC = IIf(starttime == 000000, DayC, DayC0);
PP = (DayL + DayH + DayC)/3 ;
R1 = (2 * PP) - DayL;
S1 = (2 * PP) - DayH;
R2 = (PP - S1) + R1;
S2 = PP - (R1 - S1);
R3 = R1 +(DayH-DayL);
S3 = S1 - (DayH-DayL);
PP = IIf(timecond, PP, Null);
PP = ValueWhen(timecond OR timecond2, PP);
R1 = IIf(timecond, R1, Null);
R1 = ValueWhen(timecond OR timecond2, R1);
R2 = IIf(timecond, R2, Null);
R2 = ValueWhen(timecond OR timecond2, R2);
R3 = IIf(timecond, R3, Null);
R3 = ValueWhen(timecond OR timecond2, R3);
S1 = IIf(timecond, S1, Null);
S1 = ValueWhen(timecond OR timecond2, S1);
S2 = IIf(timecond, S2, Null);
S2 = ValueWhen(timecond OR timecond2, S2);
S3 = IIf(timecond, S3, Null);
S3 = ValueWhen(timecond OR timecond2, S3);
style = styleBar | styleNoRescale;
rcolor = ParamColor("Color Resists",colorGreen);
scolor = ParamColor("Color Supports",colorCustom10);
pcolor = ParamColor("Color PP",colorTan);
GraphXSpace = 5;
SetChartOptions(0, chartShowDates);
PlotText( "PP", BarCount+20, LastValue(pp)-tick, pcolor);
Plot(PP, "", pcolor, style);
PlotText( "R1", BarCount+20, LastValue(r1)-tick, rcolor);
Plot(R1, "", rcolor, style);
PlotText( "R2", BarCount+20, LastValue(r2)-tick, rcolor);
Plot(R2, "", rcolor, style);
PlotText( "R3", BarCount+20, LastValue(r3)-tick, rcolor);
Plot(R3, "", rcolor, style);
PlotText( "S1", BarCount+20, LastValue(s1)-tick, scolor);
Plot(S1, "", scolor, style);
PlotText( "S2", BarCount+20, LastValue(s2)-tick, scolor);
Plot(S2, "", scolor, style);
PlotText( "S3", BarCount+20, LastValue(s3)-tick, scolor);
Plot(S3, "", scolor, style);
_SECTION_END();
|
Quoted
Ami = is from Amiga Commodore was one of the best software in Amiga those years. After that when Commodore close, the owner Tomasz Janeczko he turn to windows platform this wonderful technical analysis software and he turn it to one of the most powerful programs that i ever seen
Users who thanked for this post:
Krümel (24.01.2011), Perfect Trader (08.01.2011)
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
_SECTION_BEGIN("2bar range");
pv = Param("PIP value",0.0001,0.0001,0.01,0.01);
tbrc = ParamColor("Color 2bar range",colorLightGrey);
tbhc = ParamColor("Color range high",colorPaleGreen);
tblc = ParamColor("Color range low",colorOrange);
tbl = LLV(L,2);
tbh = HHV(H,2);
tbr = Prec((tbh-tbl)/pv,1);
tbh = tbh * (tbh == LastValue(tbh));
tbl = tbl * (tbl == LastValue(tbl));
tbh = IIf(tbh,tbh,Null);
tbl = IIf(tbl,tbl,Null);
Plot(tbh, "", tbhc, styleBar, styleDashed);
Plot(tbl, "", tblc, styleBar, styleDashed);
RangeTitle = EncodeColor(tbrc) + "2Bar Range: " + EncodeColor(tbrc) + tbr;
Title= StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) ",
O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) + "\n"+ RangeTitle;
_SECTION_END();
|

Danke, damit wäre die Fehlermeldung weg. Leider bringt es keinen Erfolg in Sachen die vor dem Schließen von AB individuell vorgefundene Chart Rangeeinstellung beim nächsten Start von AB wieder vorzufinden.
|
|
Source code |
1 2 3 4 5 6 7 8 |
#include "C:\Programme\AmiBroker\Formulas\Include\PersistentVariables.afl"
Plot( C, "", 1, 128 );
RestoreLastUsedRange();
Title = "\n" +
"ChartIDStr: " + NumToStr( GetChartID(), 1.0, False ) + "\n" +
"FirstIndex: " + Status( "firstvisiblebarindex" ) + "\n" +
" LastIndex: " + Status( "Lastvisiblebarindex" );
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
<NotepadPlus>
<UserLang name="AFL" ext="afl AFL">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="yes" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">"00"00</Keywords>
<Keywords name="Folder+">{</Keywords>
<Keywords name="Folder-">}</Keywords>
<Keywords name="Operators">- ! % & ( ) , . : ; ? [ ] ^ | + < = ></Keywords>
<Keywords name="Comment">1/* 2*/ 0//</Keywords>
<Keywords name="Words1">AND False NOT Null OR True Avg BarCount Buy BuyPrice C Close Column0 Column0Format Column0Name Column1 Column1Format Column1Name Column2 Column2Format Column2Name Column3 Column3Format Column3Name Column4 Column4Format Column4Name Column5 Column5Format Column5Name Column6 Column6Format Column6Name Column7 Column7Format Column7Name Column8 Column8Format Column8Name Column9 Column9Format Column9Name Cover CoverPrice Exclude Filter Graph0 Graph0BarColor Graph0Color Graph0High Graph0Low Graph0Name Graph0Open Graph0Style Graph1 Graph1BarColor Graph1Color Graph1High Graph1Low Graph1Name Graph1Open Graph1Style Graph2 Graph2BarColor Graph2Color Graph2High Graph2Low Graph2Name Graph2Open Graph2Style Graph3 Graph3BarColor Graph3Color Graph3High Graph3Low Graph3Name Graph3Open Graph3Style Graph4 Graph4BarColor Graph4Color Graph4High Graph4Low Graph4Name Graph4Open Graph4Style Graph5 Graph5BarColor Graph5Color Graph5High Graph5Low Graph5Name Graph5Open Graph5Style Graph6 Graph6BarColor Graph6Color Graph6High Graph6Low Graph6Name Graph6Open Graph6Style Graph7 Graph7BarColor Graph7Color Graph7High Graph7Low Graph7Name Graph7Open Graph7Style Graph8 Graph8BarColor Graph8Color Graph8High Graph8Low Graph8Name Graph8Open Graph8Style Graph9 Graph9BarColor Graph9Color Graph9High Graph9Low Graph9Name Graph9Open Graph9Style GraphXSpace GraphZOrder H High L Low MarginDeposit MaxGraph NumColumns O OI Open OpenInt PointValue PositionScore PositionSize RoundLotSize Sell SellPrice Short ShortPrice TickSize Title V Volume actionBacktest actionCommentary actionExplore actionIndicator actionOptimize actionPortfolio actionScan chartShowArrows chartShowDates colorAqua colorBlack colorBlue colorBlueGrey colorBrightGreen colorBrown colorCustom1 colorCustom10 colorCustom11 colorCustom12 colorCustom13 colorCustom14 colorCustom15 colorCustom16 colorCustom2 colorCustom3 colorCustom4 colorCustom5 colorCustom6 colorCustom7 colorCustom8 colorCycle colorDarkBlue colorDarkGreen colorDarkGrey colorDarkOliveGreen colorDarkRed colorDarkTeal colorDarkYellow colorDefault colorGold colorGreen colorGrey40 colorGrey50 colorIndigo colorLavender colorLightBlue colorLightGrey colorLightOrange colorLightYellow colorLime colorOrange colorPaleBlue colorPaleGreen colorPaleTurquoise colorPink colorPlum colorRed colorRose colorSeaGreen colorSkyblue colorTan colorTeal colorTurquoise colorViolet colorWhite colorYellow compressHigh compressLast compressLow compressOpen compressVolume expandFirst expandLast expandPoint in15Minute in1Minute in5Minute inDaily inHourly inMonthly inWeekly maskHistogram scoreNoRotate shapeCircle shapeDigit0 shapeDigit1 shapeDigit2 shapeDigit3 shapeDigit4 shapeDigit5 shapeDigit6 shapeDigit7 shapeDigit8 shapeDigit9 shapeDownArrow shapeDownTriangle shapeHollowCircle shapeHollowDownArrow shapeHollowDownTriangle shapeHollowSmallCircle shapeHollowSmallDownTriangle shapeHollowSmallSquare shapeHollowSmallUpTriangle shapeHollowSquare shapeHollowStar shapeHollowUpArrow shapeHollowUpTriangle shapeNone shapePositionAbove shapeSmallCircle shapeSmallDownTriangle shapeSmallSquare shapeSmallUpTriangle shapeSquare shapeStar shapeUpArrow shapeUpTriangle styleArea styleBar styleCandle styleDots styleHistogram styleLeftAxisScale styleLine styleNoDraw styleNoLabel styleNoLine styleNoRescale styleNoTitle styleOwnScale stylePointAndFigure styleStaircase styleSwingDots styleThick</Keywords>
<Keywords name="Words2">abs AccDist acos AddColumn AddTextColumn AddToComposite ADLine AdvIssues AdvVolume ADX AlertIf AlmostEqual AMA AMA2 ApplyStop Asc asin atan ATR BarIndex BarsSince BBandBot BBandTop BeginValue CategoryAddSymbol CategoryGetName CategoryGetSymbols CategoryRemoveSymbol CCI ceil Chaikin ClipboardGet ClipboardSet ColorHSB ColorRGB Correlation cos cosh CreateObject CreateStaticObject Cross Cum Date DateNum DateTime DateTimeToStr Day DayOfWeek DayOfYear DecIssues DecVolume DEMA EMA EnableRotationalTrading EnableScript EnableTextOutput EncodeColor EndValue Equity exp ExRem ExRemSpan fclose fdelete feof fgets Flip floor fmkdir fopen Foreign fputs frac frmdir FullName GapDown GapUp GetBaseIndex GetCategorySymbols GetChartID GetCursorMouseButtons GetCursorXPosition GetCursorYPosition GetDatabaseName GetExtraData GetOption GetPriceStyle GetRTData GetRTDataForeign GetScriptObject GetTradingInterface GroupID HHV HHVBars Highest HighestBars HighestSince HighestSinceBars Hold Hour IIf IndustryID Inside int Interval InWatchList IsContinuous IsEmpty IsFavorite IsFinite IsIndex IsNan IsNull IsTrue LastValue LineArray LinearReg LinRegIntercept LinRegSlope LLV LLVBars log log10 Lowest LowestBars LowestSince LowestSinceBars MA MACD MarketID Max MDI Median MFI Min Minute Month Name NoteGet NoteSet Now NumToStr NVI Nz OBV Optimize OscP OscV Outside Param ParamColor ParamDate ParamField ParamList ParamStr ParamStyle ParamTime ParamToggle ParamTrigger PDI Peak PeakBars Percentile Plot PlotForeign PlotGrid PlotOHLC PlotShapes PlotText PlotVAPOverlay Prec Prefs printf PVI Random Ref RelStrength RestorePriceArrays RMI ROC round RSI RWI RWIHi RWILo SAR Second SectorID SelectedValue SetBarsRequired SetChartBkColor SetChartOptions SetCustomBacktestProc SetForeign SetFormulaName SetOption SetPositionSize SetTradeDelays sign Signal sin sinh sqrt StaticVarGet StaticVarGetText StaticVarRemove StaticVarSet StaticVarSetText Status StdErr StDev StochD StochK StrExtract StrFind StrFormat StrLeft StrLen StrMid StrRight StrToDateTime StrToLower StrToNum StrToUpper Study Sum tan tanh TEMA TimeFrameCompress TimeFrameExpand TimeFrameGetPrice TimeFrameMode TimeFrameRestore TimeFrameSet TimeNum Trin Trix Trough TroughBars TSF Ultimate UncIssues UncVolume ValueWhen VarGet VarGetText VarSet VarSetText Version Wilders WMA WriteIf WriteVal Year Zig _N _TRACE</Keywords>
<Keywords name="Words3">#include #include_once #pragma do else for function global if local procedure return while</Keywords>
<Keywords name="Words4">_DEFAULT_NAME _PARAM_VALUES _SECTION_BEGIN _SECTION_END _SECTION_NAME</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="800040" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="800040" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="800040" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="C0C0C0" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="NUMBER" styleID="4" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER1" styleID="14" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
</Styles>
</UserLang>
</NotepadPlus>
|
Users who thanked for this post:
ibelieve (25.11.2010), Krümel (25.11.2010), Mr. Moon (11.02.2011), Perfect Trader (25.11.2010), Vikke (06.06.2011)
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
_SECTION_BEGIN("sweet spots");
//by trash
TicDiv= Param("Tic or PIP value",0.0001,0.0001,0.01,0.01);
spColor=ParamColor("SP Color", ColorRGB(100,100,0));
SPlgth = ParamToggle("Length of SP Line (Hourly|Daily)", "Hourly|Daily");
if(SPlgth == 0){
TimeFrameSet( inHourly);
}
else if (SPlgth == 1){
TimeFrameSet( inDaily);
}
ssp1= C / ticdiv;
ssp1= ssp1 - ssp1%50;
ssp2= ssp1 + 50;
ds1= ssp1*ticdiv;
ds2= ssp2*ticdiv;
TimeFrameRestore();
if(SPlgth == 0){
sp1 = TimeFrameExpand(ds1,inHourly);
sp2 = TimeFrameExpand(ds2,inHourly);
sp1 = sp1 * (Hour() == LastValue(Hour()));
sp2 = sp2 * (Hour() == LastValue(Hour()));
}
else if (SPlgth == 1){
sp1 = TimeFrameExpand(ds1,inDaily);
sp2 = TimeFrameExpand(ds2,inDaily);
sp1 = sp1 * (Day() == LastValue(Day()));
sp2 = sp2 * (Day() == LastValue(Day()));
}
sp1 = IIf(sp1,sp1,Null);
sp2 = IIf(sp2,sp2,Null);
if (ticdiv == 0.01) {
p1 = StrRight( NumToStr( sp1*ticdiv, 4.4 ), 2);
p2 = StrRight( NumToStr( sp2*ticdiv, 4.4 ), 2);
}
else if (ticdiv == 0.0001){
p1 = StrRight( NumToStr( sp1, 4.4 ), 2);
p2 = StrRight( NumToStr( sp2, 4.4 ), 2);
}
PlotText( p1, BarCount+10, LastValue(sp1)-ticdiv, spcolor);
PlotText( p2, BarCount+10, LastValue(sp2)-ticdiv, spcolor);
Plot(sp1,"", spColor ,styleBar | styleDashed | styleNoLabel);
Plot(sp2,"", spColor , styleBar | styleDashed | styleNoLabel);
_SECTION_END();
|
Forum Software: Burning Board® 3.1.6, developed by WoltLab® GmbH