Hi, I don't understand your last message :-( Could you explain it again ? I wrote stupid system:
RequestTimedRefresh (3, False); SetTradeDelays(0,0,0,0); function GetSecondNum() { // zwraca liczbê sekund z fukcji Now(4) Time = Now(4); Seconds = int(Time%100); Minutes = int(Time/100%100); Hours = int(Time/10000%100); SecondNum= int(Hours*60*60+Minutes*60+Seconds); return SecondNum; } Buy = Cross( MACD(), Signal() ); Sell = Cross( Signal(), MACD() ); AASettings = Status("action"); Newperiod = GetSecondNum() % Interval() == 0; // START - IS IT OK ????????????????????????????? if (((AASettings == 1) OR (AASettings == 2)) && (NewPeriod)) { if (Sell[BarCount-1]) Say( "SELL" ); if (Buy[BarCount-1]) Say("BUY"); } // END - IS IT OK ????????????????????????????? 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() ); PlotShapes(Buy*shapeUpArrow,colorGreen,0,Low); PlotShapes(Sell*shapeHollowDownArrow,colorGreen,0,High); Is this red code OK ? I want to know at the close for last period (last bar) signal for SELL or BUY. Regards