Algorithms

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
How to install
Swingarm ATR
  1
  0
  149
free  14 Jan 2023
//+------------------------------------------------------------------+ //|                                      Indicator: Swingarm ATR.mq4 | //|                                       Created with EABuilder.com | //|                                        https://www.eabuilder.com | //+------------------------------------------------------------------+ #property copyright "Created with EABuilder.com" #property link      "https://www.eabuilder.com" #property version   "1.00" #property description "" #include <stdlib.mqh> #include <stderror.mqh> //--- indicator settings #property indicator_chart_window #property indicator_buffers 1 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 #property indicator_color1 0xFFAA00 #property indicator_label1 "Buy" //--- indicator buffers double Buffer1[]; double myPoint; //initialized in OnInit void myAlert(string type, string message)   {    if(type == "print")       Print(message);    else if(type == "error")      {       Print(type+" | Swingarm ATR @ "+Symbol()+","+IntegerToString(Period())+" | "+message);      }    else if(type == "order")      {      }    else if(type == "modify")      {      }   } //+------------------------------------------------------------------+ //| Custom indicator initialization function                         | //+------------------------------------------------------------------+ int OnInit()   {       IndicatorBuffers(1);    SetIndexBuffer(0, Buffer1);    SetIndexEmptyValue(0, EMPTY_VALUE);    SetIndexArrow(0, 241);    //initialize myPoint    myPoint = Point();    if(Digits() == 5 || Digits() == 3)      {       myPoint *= 10;      }    return(INIT_SUCCEEDED);   } //+------------------------------------------------------------------+ //| Custom indicator iteration function                              | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total,                 const int prev_calculated,                 const datetime& time[],                 const double& open[],                 const double& high[],                 const double& low[],                 const double& close[],                 const long& tick_volume[],                 const long& volume[],                 const int& spread[])   {    int limit = rates_total - prev_calculated;    //--- counting from 0 to rates_total    ArraySetAsSeries(Buffer1, true);    //--- initial zero    if(prev_calculated < 1)      {       ArrayInitialize(Buffer1, EMPTY_VALUE);      }    else       limit++;        //--- main loop    for(int i = limit-1; i >= 0; i--)      {       if (i >= MathMin(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation                 //Indicator Buffer 1       if(#———————————–       input trailType = {default modified, unmodified};       input ATRPeriod = 28;       input ATRFactor = 5;       input firstTrade = {default long, short};       input averageType = AverageType.WILDERS;              input fib1Level = 61.8;       input fib2Level = 78.6;       input fib3Level = 88.6;              Assert(ATRFactor > 0, “‘atr factor’ must be positive: ” + ATRFactor);              def HiLo = Min(high – low, 1.5 * Average(high – low, ATRPeriod));       def HRef = if low <= high[1]       then high – close[1]       else (high – close[1]) – 0.5 * (low – high[1]);       def LRef = if high >= low[1]       then close[1] – low       else (close[1] – low) – 0.5 * (low[1] – high);              def trueRange;       switch (trailType) {       case modified:       trueRange = Max(HiLo, Max(HRef, LRef));       case unmodified:       trueRange = TrueRange(high, close, low);       }       def loss = ATRFactor * MovingAverage(averageType, trueRange, ATRPeriod);              def state = {default init, long, short};       def trail;       switch (state[1]) {       case init:       if (!IsNaN(loss)) {       switch (firstTrade) {       case long:       state = state.long;       trail = close – loss;       case short:       state = state.short;       trail = close + loss;       }       } else {       state = state.init;       trail = Double.NaN;       }       case long:       if (close > trail[1]) {       state = state.long;       trail = Max(trail[1], close – loss);       } else {       state = state.short;       trail = close + loss;       }       case short:       if (close < trail[1]) {       state = state.short;       trail = Min(trail[1], close + loss);       } else {       state = state.long;       trail = close – loss;       }       }              def BuySignal = Crosses(state == state.long, 0, CrossingDirection.ABOVE);       def SellSignal = Crosses(state == state.short, 0, CrossingDirection.ABOVE);              def ex = if BuySignal then high else if SellSignal then low else if state == state.long then Max(ex[1], high) else if state == state.short then Min(ex[1], low) else ex[1];              plot TrailingStop = trail;              TrailingStop.SetPaintingStrategy(PaintingStrategy.POINTS);       TrailingStop.DefineColor(“Long”, Color.GREEN);       TrailingStop.DefineColor(“Short”, Color.RED);       TrailingStop.AssignValueColor(if state == state.long       then TrailingStop.Color(“Long”)       else Tra //Custom Code       )         {          Buffer1[i] = Low[i]; //Set indicator value at Candlestick Low         }       else         {          Buffer1[i] = EMPTY_VALUE;         }      }    return(rates_total);   } //+------------------------------------------------------------------+
by willbs
free  13 Jan 2023
It uses several parameters such as Initial Volume, Stop Loss, Take Profit, Trailing Stop Loss, and Spread Limit to execute trades on the market. The robot has a random trade type generator that can either select a buy or sell trade. The robot also has a closed position event handler that will execute a new trade if the previous one closed with a profit, or will double the volume of the previous trade if the previous one closed with a loss. Additionally, it stops the bot if it runs out of money. Tip: Run extended optimization to get better parameters, at least 2 years. The print values ​​are for only 1 week.
FIR Slope indicator
  1
  0
  148
by mfejza
free  13 Jan 2023
The indicator result, is calculated from FIR (Finite Impulse Response Filter) indicator and price levels Use histogram as short term trend and dots (green and red) as open position trigger. For more information about FIR indicator click here
winner fx
  0
  0
  288
free  10 Jan 2023
greats profits
by mfejza
free  09 Jan 2023
Directional Volatility indicator. The indicator displays two volatility lines; bullish (green component) and bearish (red component).
CoVariance indicator
  4
  0
  162
by mfejza
free  09 Jan 2023
CoVariance function as indicator to interpret trade sentiment zones
by willbs
free  08 Jan 2023
The most faster Bot for Day Trader Indicators in Bot: RSI + ParabolicSAR + OBV With Trailing Stop Bot close positions if has been open for more than 2 hour. Bot open new positions only between 6AM and 7PM (server hour).
by mfejza
free  06 Jan 2023
This indicator is used for positions trailing stop, and is calculated separately for long (green component) and short (red component) trades, based on price cycles.  
by mfejza
free  06 Jan 2023
Volatility Channel by Larry Williams indicator Conditions Long: price > (top channel + bottom channel)/2 Short: price < (top channel + bottom channel)/2 Note, increase calculation periods, to increase projection (in bars)
free  04 Jan 2023
This code simply displays the current spread on the chart. You can change its position or color. My current unit is Points (0.1 pips). - Visit https://ctrader.com/users/profile/55833 to see my other robots. - Visit http://fx4u.net/robot/ to download my other robots file.  
Aw Slowing Moving
  0
  0
  234
free  01 Jan 2023
Add Slowing to Aw Moving Average.
Aw Ichimoku Macd
  3
  0
  197
free  31 Dec 2022
this indicaotr show distance between Tenkan to Kijun, Close to Kijun and Close to Tenkan