Merhabalar,
Aşağıda paylaşılan sistemi lütfen inceleyiniz.
***STRATEJİLERİ TEST/DENEME ORTAMINDA SINAMADAN VE SİZİN İSTEDİĞİNİZ ŞEKİLDE ÇALIŞTIĞINA EMİN OLMADAN GERÇEK ORTAMDA HİÇBİR ZAMAN ÇALIŞTIRMAYINIZ ***
using System;
using System.Collections.Generic;
using System.Linq;
using Matriks.Data.Symbol;
using Matriks.Engines;
using Matriks.Indicators;
using Matriks.Symbols;
using Matriks.Trader.Core;
using Matriks.Trader.Core.Fields;
using Matriks.Lean.Algotrader.AlgoBase;
using Matriks.Lean.Algotrader.Models;
using Matriks.Lean.Algotrader.Trading;
using Matriks.AI;
using Matriks.AI.AiParameters;
using Matriks.AI.Data;
using Matriks.Trader.Core.TraderModels; namespace Matriks.Lean.Algotrader
{
public class muhasebecihat : MatriksAlgo
{
[SymbolParameter("GARAN")]
public string Symbol;
[Parameter(SymbolPeriod.Min)]
public SymbolPeriod SymbolPeriod;
[Parameter(1)]
public int MavilimwFirstMovPeriod1; [Parameter(1)]
public int MavilimwSecondMovPeriod1; [Parameter(5)]
public int MovPeriod1; [Parameter(MovMethod.S)]
public MovMethod MovMovMethod1; [Parameter(1)]
public int AwesomeoscillatorShortPeriod1; [Parameter(34)]
public int AwesomeoscillatorLongPeriod1; [Parameter(1)]
public int OrderQuantity; MAVILIMW mavilimw;
MOV mov;
AwesomeOscillator awesomeOscillator;
public override void OnInit()
{
AddSymbol(Symbol, SymbolPeriod); SendOrderSequential(true); mavilimw = MAVILIMWIndicator(Symbol, SymbolPeriod, MavilimwFirstMovPeriod1, MavilimwSecondMovPeriod1);
mov = MOVIndicator(Symbol, SymbolPeriod, OHLCType.Close, MovPeriod1, MovMovMethod1);
awesomeOscillator = AwesomeOscillatorIndicator(Symbol, SymbolPeriod, OHLCType.Close, AwesomeoscillatorShortPeriod1, AwesomeoscillatorLongPeriod1);
}
public override void OnInitCompleted()
{
} public override void OnDataUpdate(BarDataCurrentValues barDataCurrentValues)
{
{
var barData = GetBarData();
var RefTilson1 = Ref(mavilimw, -1);
var RefTilson2 = Ref(mavilimw, -2);
if (CrossAbove(mov, mavilimw, 0, 0)
&& awesomeOscillator.Value[0][awesomeOscillator.CurrentIndex] > 0m
&& mavilimw.CurrentValue>RefTilson1 && RefTilson1 <= RefTilson2)
{
SendMarketOrder(Symbol, OrderQuantity, OrderSide.Buy);
} if (CrossBelow(mov, mavilimw, 0, 0)
&& awesomeOscillator.Value[0][awesomeOscillator.CurrentIndex] < 0m
&& mavilimw.CurrentValue<RefTilson1 && RefTilson1 >= RefTilson2)
{
SendMarketOrder(Symbol, OrderQuantity, OrderSide.Sell);
}
}
} public override void OnOrderUpdate(IOrder order)
{
if (order.OrdStatus.Obj == OrdStatus.Filled)
{
}
} public override void OnStopped()
{
}
}
}
İyi çalışmalar.