sar cycle stop help
- Please use the styler in the editor: Ctrl+,
- Please use Alt+S (or the button </>) when posting code here.
- If your code doesn't do, what you want just use the debugger (Ctrl+F5) and track the relevant variables - it's a lot fast then waiting for posts here and it helps you learning :)
Can you please help me?
#include <Trade \ Trade.mqh> CTrade ticareti; void Ontick () { double Ask = NormalizeDouble (SymbolInfoDouble (_Symbol, SYMBOL_ASK), Rakamlar; double Bid = NormalizeDouble (SymbolInfoDouble (_Symbol, SYMBOL_BID), Digits; dize sinyali = ""; Mqlrates PriceArray []; ArraySetAsSeries (PriceArray, true); int Veri = CopyRates (_Symbol, _Period, 0,3, PriceArray); çift mySARArray []; int SARDefinition = iSAR (_Sembol, _Dönem, 0,02,0,2); ArraySetAsSeries (mySARArray, true); Copybuffer (SARDefinition, 0,0,3, mySARArray); çift LastSARValue = NormalizeDouble (mySARArray [1], 5); eğer (LastSARValue <PriceArray [1] .low) { signal = "satın al"; } eğer (LastSARValue> PriceArray [1] .high) { signal = "sat"; } if (signal == "sat" && PositionTotal () <1 trade.Sell (0.01, NULL, Bid, (Bid + 200 * _Point), (Bid-150 * _Point), NULL); if (signal == "satın al" && PositionTotal () <1 trade.Buy (0.01, NULL, Ask, (Sor + 200 * _Point), (Ask-150 * _Point), NULL); Yorum ("Sinyal:", sinyal); }