Friday, June 29, 2018

Simple Sell Expert Advisor for MT4

For simple place sell order on MT4 using expert advisor code:
This code place one sell order automatically on your MT4 window.

//+------------------------------------------------------------------+
//|                                                                 opensellorder.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.forexwithcandlestick.blogspot.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.forexwithcandlestick.blogspot.com"
#property version   "1.00"
#property strict
//+----------------------------------------------------------------------
extern double Lots =0.1;
extern double StopLoss=50;
extern double TakeProfit=50;
extern int Slippage=3;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int start(){

//manage open orders here

if (OrdersTotal() > 0){
      return(0);
}

//open new orders here
{                                          // Opening SELL
    OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask-StopLoss*Point,Ask+TakeProfit*Point);
    return(0);                                 
  }

}


//----------------------------------------------------------------------------+


Simple Buy Expert Advisor for MT4

For simple place buy order on MT4 using expert advisor code:
This code place one buy order automatically on your MT4 window.

//+------------------------------------------------------------------+
//|                                                                 openbuyorder.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.forexwithcandlestick.blogspot.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.forexwithcandlestick.blogspot.com"
#property version   "1.00"
#property strict
//+----------------------------------------------------------------------
extern double Lots =0.1;
extern double StopLoss=50;
extern double TakeProfit=50;
extern int Slippage=3;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int start(){

//manage open orders here

if (OrdersTotal() > 0){
      return(0);
}

//open new orders here
{                                          // Opening BUY
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-StopLoss*Point,Bid+TakeProfit*Point);
    return(0);                               
  }

}


//----------------------------------------------------------------------------+

Simple Sell Expert Advisor for MT4

Sunday, June 24, 2018

Simple RSI Value Signal for MT4

Create Simple RSI Value Signal on your MT4 chart.
Step 1.
create Simple RSI Value file in expert folder and

Step 2. copy paste code given below on your Simple RSI Value file :
//code start

void OnTick()
{
//create a string variable for the signal
string signal="";
//calculate the RSI value
double RSIValue = iRSI(_Symbol,_Period,14,PRICE_CLOSE,0);
//if the RSI value is below 20
if (RSIValue<20)
{
//create a sell signal
signal ="buy";
}
//if the RSI value is above 80
if (RSIValue>80)
{
//create a sell signal
signal  = "sell";
}
//screen output
Comment ("RSIValue: ",RSIValue, "\n","signal:",signal);
}
//+------------------------------------------------------------------+
//code end
Step 3.
Now open MT4 and go to :
Insert >> Indicator >> Oscillator >> Relative Strength Index 

Step 4.
Now open MT4 and go to :
Charts >> Template >> save template >> save file as tester.tpl.

Step5.
Now open MT4 and go to :
View >> strategy test : 
set your symbol
Use date
Visual Mode
Start

Step6.
View signal on left side on top in your chart.

Saturday, June 23, 2018

Expert Advisor for Simple Close Price

View Candle Close Price on your MT4 chart.
Step 1.
create SimpleClosePrice file in expert folder and

Step 2. copy paste code given below on your SimpleClosePrice file :
//code start

//+------------------------------------------------------------------+
//| simple close price EA                                            |
//+------------------------------------------------------------------+
void OnTick()
  {
//Create an Array
MqlRates PriceInformation[];
//Sort it from current candle to oldest candle
ArraySetAsSeries (PriceInformation,True);
//copy price data into the array
int Data=CopyRates(Symbol(),Period(),0,Bars(Symbol(),Period()),PriceInformation);
//get the current close price
double closePrice= PriceInformation[0].close;
//chart output
Comment ("Close Price for candle 0:",closePrice);
   
  }
//+------------------------------------------------------------------+

//code end

Step3.
Now open MT4 and go to :
View >> strategy test : 
set your symbol
Use date
Visual Mode
Start

Step4.
View Candle Close Pricel on left side on top in your chart.

Friday, June 22, 2018

Simple Moving Average Crossover Signal

Create Simple Moving Average Signal on your MT4 chart.
Step 1.
create SimpleSMACrossover file in expert folder and

Step 2. copy paste code given below on your SimpleSMACrossover file :
//code start

void OnTick()
  {
//current chart, current period, 20 candles, No shift, simple , close price
double SlowMovingAverage = iMA (NULL,0,20,0,MODE_SMA,PRICE_CLOSE,0);
//current chart, current period, 20 candles, No shift, simple , close price
double LastSlowMovingAverage = iMA (NULL,0,20,0,MODE_SMA,PRICE_CLOSE,1);

//current chart, current period, 10 candles, No shift, simple , close price
double FastMovingAverage = iMA (NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0);
//current chart, current period, 10 candles, No shift, simple , close price
double LastFastMovingAverage = iMA (NULL,0,10,0,MODE_SMA,PRICE_CLOSE,1);
//if the fast SMA is now above
if ((LastFastMovingAverage < LastSlowMovingAverage) && (FastMovingAverage > SlowMovingAverage))
//chart output for BUY signal
Comment ("BUY");
//if the fast SMA is now above
if ((LastFastMovingAverage > LastSlowMovingAverage) && (FastMovingAverage < SlowMovingAverage))
//chart output for SELL signal
Comment ("SELL");   
  }
//+------------------------------------------------------------------+
//code end
Step 3.
Now open MT4 and go to :
Insert >> Indicator >> Moving Average 
Set parameter : Period : 10 , shift : 0 , MA Method : Simple , Apply to : close , style : Yellow then OK
repeate again 
Insert >> Indicator >> Moving Average 
Set parameter : Period : 20 , shift : 0 , MA Method : Simple , Apply to : close , style : Red then OK 

Step 4.
Now open MT4 and go to :
Charts >> Template >> save template >> save file as tester.tpl.

Step5.
Now open MT4 and go to :
View >> strategy test : 
set your symbol
Use date
Visual Mode
Start

Step6.
View signal on left side on top in your chart.


Wednesday, June 20, 2018

open multiple buy sell order automatic

Using my this Expert Advisor for open multiple buy sell order automatic.
Create your new EA in your MT4 and copy this code and paste in your new EA file. After compile Open your MT4 and drag and drop your EA on your favourite currency pair window. Your 6 ( 3 Buy and 3 Sell ) order automatic create in your MT4 .

You can change your stoploss and take profit:
For Sell  stoploss edit : Ask+1000
For Buy stoploss edit : Bid-1000

For Sell  takeprofit edit : Ask-50
For Buy takeprofit edit : Bid+50

//+------------------------------------------------------------------+
//|                                                   singleopen.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int start(){

//manage open orders here

if (OrdersTotal() > 3){
      return(0);
}

//open new orders here
{                                          // Opening BUY
   OrderSend(Symbol(),OP_SELL,0.01,Bid,2,Ask+1000*Point,Ask-50*Point);
    OrderSend(Symbol(),OP_BUY,0.01,Ask,2,Bid-1000*Point,Bid+50*Point);
    return(0);                                 
  }

}

//+-----------------------------------------------------------------------------+
NOTE : THIS SCRIPT ONLY FOR EDUCATIONAL PURPOSE .YOU CAN USE THIS OWN RISK.BEFORE USE ON LIVE ACCOUNT TRY DEMO ACCOUNT FOR TEST.
I AM NOT RESPONSIABLE FOR ANY LOSE YOUR MONEY

Friday, June 15, 2018

How to use two expert advisor on MT4

Today I explain how to use two Expert Advisor ( EA) on MT4.
Open you MT4 and right click on expert folder and create two expert advisor : singleopenbuy and singleopensell
Now add two your favourite currency window and active expert advisor one by one in both window.
In the first window active  singleopenbuy In the second window active singleopensell

Now you are ready for trading trade automatic open one sell and one buy on same time everytimes.


Create new expert advisor for singleopenbuy with this code :

//+------------------------------------------------------------------+
//|                                                   singleopen.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int start(){

//manage open orders here

if (OrdersTotal() > 0){
      return(0);
}

//open new orders here
{                                          // Opening BUY
   OrderSend(Symbol(),OP_BUY,0.01,Ask,2,Bid-5*Point,Bid+5*Point);
   return(0);                                   // Exit start()
  }

}

-----------------------------------------------------------------------------------------------------------------


Create new expert advisor for singleopensell with this code :

//+------------------------------------------------------------------+
//|                                                   singleopen.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int start(){

//manage open orders here

if (OrdersTotal() > 0){
      return(0);
}

//open new orders here
{                                          // Opening BUY
   OrderSend(Symbol(),OP_SELL,0.01,Bid,2,Ask+5*Point,Ask-5*Point);
   return(0);                                   // Exit start()
  }

}

Thursday, June 14, 2018

Buy Sell trade open same time

If you want open buy and sell trade at same time then copy this code and paste in script folder of MT4. This script open buy sell trade for you at same time.
Open MT4 and click right click on Script folder then create new editor , choose script and give name of file send_buy&sell and paste this code then compile.
Now just drag and down on MT4 screen and you seen EA created order for you.
You need to everytime darg and down if you want new order.

//+------------------------------------------------------------------+
//|                                                send_buy&sell.mq4 |
//+------------------------------------------------------------------+

//---- Parametres Externes
extern double   BuyLots = 0.01;
extern int      BuyStopLoss = 100;
extern int      BuyTakeProfit = 100;
extern double   SellLots = 0.01;
extern int      SellStopLoss = 100; 
extern int      SellTakeProfit = 100;

//+------------------------------------------------------------------+
//| script "send pending order with expiration data"                 |
//+------------------------------------------------------------------+
int start()
  {
   int    ticket,expiration;
   double point;
//----
   point=MarketInfo(Symbol(),MODE_POINT);
   expiration=CurTime()+PERIOD_M15*60;
//----
   while(true)
     {
      ticket=OrderSend(Symbol(),OP_SELL,SellLots,Bid,0,Bid+SellStopLoss*Point,Bid-SellTakeProfit*Point,"SELL",NULL,0,Red);
      if(ticket<=0) Print("Error = ",GetLastError());
      else { Print("ticket = ",ticket); break; }
      //---- 10 seconds wait
      Sleep(10);
     }
     while(true)
     {
      ticket=OrderSend(Symbol(),OP_BUY,BuyLots,Ask,0,Ask-BuyStopLoss*Point,Ask+BuyTakeProfit*Point,"BUY",NULL,0,Lime);
      if(ticket<=0) Print("Error = ",GetLastError());
      else { Print("ticket = ",ticket); break; }
      //---- 10 seconds wait
      Sleep(10);
     }
//----
   return(1);
  }
//+------------------------------------------------------------------+

Saturday, June 9, 2018

Free forex trading signal

Are you new in forex trading and not expert in fining a good forex single then search free forex signal provider. In the web world you can find many company for singnal company provide free and paid signal for you.
I also try free signal for my first forex trading and I get the profit from my first trading without using   any signal tools.
I use TradingView and live-forex-signals.com

You can use this website for free forex signal.


Present Market Rates provided byForex4you

Wednesday, June 6, 2018

Candlestick Basics

Candlestick charts are an effective way of visualizing price movements. There are two basic candlesticks:
  • Bullish Candle: When the close is higher than the open (usually green or white) 
  • Bearish Candle: When the close is lower than the open (usually red or black)
There are three main parts to a candlestick:
Upper Shadow: The vertical line between the high of the day and the close (bullish candle) or open (bearish candle)
Real Body: The difference between the open and close; colored portion of the candlestick
Lower Shadow: The vertical line between the low of the day and the open (bullish candle) or close (bearish candle)

Candlestick Patterns

Candlestick patterns can be made up of one candle or multiple candlesticks, and can form reversal or continuation patterns. OnlineTradingConcepts.com has many detailed explanations of these candlestick patterns; the links are given below:
  • Bullish Engulfing Pattern
  • Bearish Engulfing Pattern
  • Dark Cloud Cover
  • Doji
  • Dragonfly Doji
  • Evening Star
  • Gravestone Doji
  • Hammer
  • Hanging Man
  • Harami
  • Inverted Hammer
  • Morning Star
  • Piercing Pattern
  • Shooting Star
  • Tweezer Tops & Bottoms
  • Windows

What is Candlesticks?

Japanese candlestick chart analysis, so called because the candlestick lines resemble candles, have been refined by generations of use in the Far East. Candlestick charts are now used internationally by swing traders, day traders, investors and premier financial institutions.

Candlestick charts:

  • Easy to understand: Anyone, from the person new to technical analysis to the seasoned professional trader can easily harness the power of candlestick charts. This is because, as will be shown later, the same data required to draw a bar chart (high, low, open and close) is used for a candlestick chart.

  • Provide earlier indications of market turning points: candlestick charts can send out reversal signals in a few sessions, rather than the weeks often needed for a bar chart reversal signal. Thus, market turns with candlestick charts will frequently be in advance of traditional indicators. This will help you to enter and exit the market with better timing.

  • Furnish unique market insights: candlestick charts not only show the trend of the move, as does a bar chart, but, unlike bar charts, candlestick charts also show the force underpinning the move.

  • You Can used in all markets such as the stock market, forex market, or futures or commodity markets and can be a powerful trading tool for option trading.