Regisztráció Elfelejtett jelszó

Re: GAP

Amatoregy Előzmény: #172892

Nem megy ezzel se.

Ime a teljes:

_SECTION_BEGIN("Price");

SetChartOptions(0,chartShowArrows|chartShowDates);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )

{

ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));

}

_SECTION_END();

_SECTION_BEGIN("MA");

P = ParamField("Price field",-1);

Periods = Param("Periods", 5, 2, 200, 1 );

Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

_SECTION_END();

_SECTION_BEGIN("Mid MA");

P = ParamField("Price field",-1);

Periods = Param("Periods", 20, 2, 300, 1 );

Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

_SECTION_END();

_SECTION_BEGIN("Long MA");

P = ParamField("Price field",-1);

Periods = Param("Periods", 50, 2, 400, 1 );

Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

_SECTION_END();

_SECTION_BEGIN("BBands");

P = ParamField("Price field",-1);

Periods = Param("Periods", 20, 2, 100, 1 );

Width = Param("Width", 2, 0, 10, 0.05 );

Color = ParamColor("Color", colorLightGrey );

Style = ParamStyle("Style") | styleNoRescale;

Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style );

Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style );

_SECTION_END();

_SECTION_BEGIN("Price Interpretation");

movshort = ParamField("Short Time MA", 8 );

movmed = ParamField("Mid Time MA", 9 );

movlong = ParamField("Long Time MA", 10 );

btop = ParamField("BBTop", 11 );

bbot = ParamField("BBBottom", 12 );

if( Status("action") == actionCommentary )

{

width = btop - bbot;

lslop = LinRegSlope( C, 30 ) + 100;

lslo = LLV( lslop, 90 );

lshi = HHV( lslop, 90 );

lswidth = lshi - lslo;

trend = 100*( lslop - lslo )/lswidth;

mawidth = MA( width, 100 );

relwidth = 100*(width - mawidth)/mawidth;

_N( tname = Name()+"("+FullName()+")" );

printf("Price and moving averages:\n");

printf( tname + " has closed " + WriteIf( C > movshort, "above" , "below" ) + " its Short time moving average. ");

printf("\nShort time moving average is currently " + WriteIf( movshort > movmed, "above", "below") + " mid-time, AND " + WriteIf( movshort > movlong, "above", "below" ) + " long time moving averages.");

printf("\nThe relationship between price and moving averages is: "+

WriteIf( C > movshort AND movshort > movmed, "bullish",

WriteIf( C movlong , "bullish",

WriteIf( movshort < movmed AND movmed 30 AND trend < 70, "Although prices have broken the upper band and a upside breakout is possible, the most likely scenario for "+tname+" is to continue within current trading range.", "" ) ), "" ) +

WriteIf( C 0, "wider" , "narrower" ) +

" than normal.");

printf("\n");

printf(

WriteIf( abs( relwidth ) 0, colorLime, colorRed ));

//GfxSetTextColor( ColorRGB( 0, 0, 0 ) );

GfxSetBkMode(1); // transparent

GfxTextOut( U , Status("pxwidth")/2, Status("pxheight")/12);

_SECTION_END();