Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

Views:
3160
Rating:
votes: 11
Published:
2020.01.11 05:29
Updated:
2020.01.11 09:50
Cross.mq4 (5.94 KB)view

Simple code for Candle Cross above or below Conditions..

Mt5 version:- https://www.mql5.com/en/code/27597

Note: This is just a sample

Main Function


bool   crossed[2];

//+------------------------------------------------------------------+
int OnInit()
  {
   for (int i = 0; i < ArraySize(crossed); i++)
      crossed[i] = true;
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
void OnTick()
  {
//Your Buy condition
if(Cross(0,Open[0] > Condition))
     {

....//your conditions//...
     
     }

//Your Sell condition
if(Cross(1,Open[0] < Condition))
     {

....//your conditions//...
     
     }
  }
//+------------------------------------------------------------------+
bool Cross(int i, bool condition)
  {
   bool ret = condition && !crossed[i];
   crossed[i] = condition;
   return(ret);
  }


Safe Trend Scalp Safe Trend Scalp

Safe Trend Scalp is an automatic robot that trades with automatic Trend lines that ea crated with market history.

volatility_Bar volatility_Bar

volatility, flat

Dynamic Stop Loss Dynamic Stop Loss

Dynamic Stop-Loss is a tool for traders who trade without a stop-loss. It gives the traders a trick to trade as if there is no stop-loss but actually using one.

MACD Sample MACD Sample

Classical MACD Sample.