Please Help Me

 
I can login to the transaction with the EA I created.

The Moving Average Commences Trading With Its Intersection ..

Again with the Moving Average Intersect

I want him to exit the trade without waiting for the take profit or stop loss level.

Please Help Me !.



The Process Access Code is as follows.

if (Moving_6_H<Moving_0_Y);

if  (Moving_6_Y>Moving_0_H);


if (PositionsTotal()==0);

{Trade.Buy(NULL,0.05,ask,ask-0.150,ask+0.150,NULL);}

 
Please edit your posts and use the code button (Alt+S) when pasting code.
EDIT your original posts, please do not just post the code correctly in a new post.
 
//+------------------------------------------------------------------+
//|                                                          101.mq5 |
//|                                                               BB |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "BB"
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+

#include  <Trade\Trade.mqh>
CTrade Trade; 
void OnTick()
  {

double Moving_6[];
double Moving_0[];

ArraySetAsSeries(Moving_6,true);
ArraySetAsSeries(Moving_0,true);

int Moving_6_Ozellik=iMA(NULL,PERIOD_CURRENT,12,6,MODE_SMA,PRICE_CLOSE);
int Moving_0_Ozellik=iMA(NULL,PERIOD_CURRENT,12,2,MODE_SMA,PRICE_CLOSE);
   
CopyBuffer(Moving_6_Ozellik,0,0,3,Moving_6);
CopyBuffer(Moving_0_Ozellik,0,0,3,Moving_0);

double Moving_6_H=Moving_6[2];
double Moving_6_Y=Moving_0[1];

double Moving_0_H=Moving_0[2];
double Moving_0_Y=Moving_6[1];

double ask=SymbolInfoDouble(NULL,SYMBOL_ASK);
double bid=SymbolInfoDouble(NULL,SYMBOL_BID);

if (Moving_6_H<Moving_0_Y);
if  (Moving_6_Y>Moving_0_H);

if (PositionsTotal()==0);
{Trade.Buy(NULL,0.05,ask,ask-0.150,ask+0.150,NULL);}




   }
//+------------------------------------------------------------------+
 
  1. Burak Baltacı:
    #property copyright "BB"

    What part of “edit your original post” was unclear to you?

  2. Burak Baltacı: I want … Please Help Me !.

    Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum 2018.05.12

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
              No free help 2017.04.21