Избранное трейдера OnlyHuman

НОВАТЭК — это еще диивидендный аристократ, думается, что как и ЛУКойлу ему не захочется распрощаться с этим званием.
Вот подборка моих статей про дивидендных аристократов:
Дивидендные аристократы США и России 2020
Как дивидендные аристократы переживают коронакризис?
Успешных инвестиций!

p_CLASSCODE = «SPBFUT» --Код класса
p_SECCODE = «SiU0» --Код инструмента
function OnInit()
frame_60min = CreateDataSource (p_CLASSCODE, p_SECCODE, INTERVAL_H1)
frame_5min = CreateDataSource (p_CLASSCODE, p_SECCODE, INTERVAL_M5)
Index_60min = nil
Index_5min = nil
LastPrice = nil
IsRun = true
end
function main()
CreateTable()
while IsRun do
if Index_60min ~= frame_60min:Size() then
Index_60min = frame_60min:Size()
end
if Index_5min ~= frame_5min:Size() then
Index_5min = frame_5min:Size()
Transaq = 0
BuyWay = 0
SellWay = 0
end
if LastPrice ~= frame_60min:C(Index_60min) then
LastPrice = frame_60min:C(Index_60min)
BuySignal(frame_60min, Index_60min)
SellSignal(frame_60min, Index_60min)
if BuySpeed ~= nil and SellSpeed ~= nil then
if LastPrice < BuyPrice and BuySpeed > SellSpeed then
SetCell(t_id, 1, 4, «Buy»)
elseif LastPrice > SellPrice and SellSpeed > BuySpeed then
SetCell(t_id, 1, 4, «Sell»)
else
SetCell(t_id, 1, 4, «None»)
end
end
end
sleep(10)
end
namespace WealthLab.Strategies
{ // Комиссия 0.005% на сделку, проскальзывание 0.01%
public class Simple00 : WealthScript {
StrategyParameter Period, Factor;
public Simple00() {
Period = CreateParameter ("Period", 5, 1, 20, 1);
Factor = CreateParameter ("Factor",0.5, 0.1, 1, 0.1);
}
protected override void Execute() {
ClearDebug(); // HideVolume();
int period = Period.ValueInt;
double factor = Factor.Value;
DataSeries atr = ATR.Series (Bars, period);
for (int bar = period; bar < Bars.Count; ++bar) {
if (IsLastPositionActive) {
ExitAtClose (bar, LastPosition);
} else
if (Open [bar] - Close [bar] > atr [bar] * factor) {
BuyAtClose (bar);
}
}
ChartPane cp = CreatePane (40, true, true);
PlotSeries (cp, atr, Color.Black, WealthLab.LineStyle.Histogram, 3);
} // Execute()
} // class Simple00
} // namespace WealthLab.Strategies




