+ Reply to Thread
Page 5 of 5 FirstFirst ... 3 4 5
Results 41 to 44 of 44

Thread: (Ask) my EA only can open sell cannot open order buy

  1. #4
    Senior Member sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach has a reputation beyond repute sumerach's Avatar
    Join Date
    May 2019
    Location
    arifwala,pakistan
    Posts
    2,437
    Thanks
    2,605
    Thanked 4,092 Times in 1,731 Posts
    SubscribeSubscribe
    subscribed 0
    bro mujhe lagta hai k agar ap apni trade sell ki lagao market dekh kar our maarket buy ki taraf chali jay to mere keyal sy apko thora sa wait karna chahiye our jb apko lagy k ab market nechy any wali hai

    --- Update ---

    bro mujhe lagta hai k agar ap apni trade sell ki lagao market dekh kar our maarket buy ki taraf chali jay to mere keyal sy apko thora sa wait karna chahiye our jb apko lagy k ab market nechy any wali hai.

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  2. The Following 7 Users Say Thank You to sumerach For This Useful Post:

    Alizahid (2020-10-20), bahi00 (2020-10-19), Boss12 (2020-10-19), CJ7 (2020-10-20), Kanwal (2020-10-19), LOC (2020-10-20), raheel00 (2020-10-19)

  3. #3
    Member yaseenhfd is a splendid one to behold yaseenhfd is a splendid one to behold yaseenhfd is a splendid one to behold yaseenhfd is a splendid one to behold yaseenhfd is a splendid one to behold yaseenhfd is a splendid one to behold yaseenhfd's Avatar
    Join Date
    Dec 2018
    Posts
    310
    Thanks
    55
    Thanked 663 Times in 212 Posts
    SubscribeSubscribe
    subscribed 0
    bro mujhe lagta hai k agar ap apni trade sell ki lagao market dekh kar our maarket buy ki taraf chali jay to mere keyal sy apko thora sa wait karna chahiye our jb apko lagy k ab market nechy any wali hai to apko wahan par sell ki ek our trade lga deni chahiye .

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  4. The Following 5 Users Say Thank You to yaseenhfd For This Useful Post:

    Alizahid (2020-10-20), bahi00 (2020-10-19), Boss12 (2020-10-19), LOC (2020-10-20), raheel00 (2020-10-19)

  5. #2
    Member babar hanif is a jewel in the rough babar hanif is a jewel in the rough babar hanif is a jewel in the rough babar hanif is a jewel in the rough babar hanif's Avatar
    Join Date
    Mar 2018
    Posts
    829
    Thanks
    2
    Thanked 332 Times in 235 Posts
    SubscribeSubscribe
    subscribed 0
    bro mujhe lagta hai k agar ap apni trade sell ki lagao market dekh kar our maarket buy ki taraf chali jay to mere keyal sy apko thora sa wait karna chahiye our jb apko lagy k ab market nechy any wali hai to apko wahan par sell ki ek our trade lga deni chahiye .

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  6. The Following 6 Users Say Thank You to babar hanif For This Useful Post:

    Alizahid (2020-10-20), bahi00 (2020-10-19), Boss12 (2020-10-19), Kanwal (2020-10-19), LOC (2020-10-20), raheel00 (2020-10-19)

  7. #1
    Junior Member nonamefx is an unknown quantity at this point nonamefx's Avatar
    Join Date
    Jul 2015
    Posts
    1
    Thanks
    0
    Thanked 6 Times in 1 Post
    SubscribeSubscribe
    subscribed 0

    (Ask) my EA only can open sell cannot open order buy

    hello i have created ea yesterday and today i was try to simulator but when i see my ea can't open order buy
    this is my ea code
    Spoiler Spoiler:
    extern int MagicNumber=0;
    extern double Lots =0.01;
    extern double StopLoss=5;
    extern double TakeProfit=100;
    extern int TrailingStop=3;
    extern int Slippage=0;
    //+------------------------------------------------------------------+
    // expert start function
    //+------------------------------------------------------------------+
    int start()
    {
    double MyPoint=Point;
    if(Digits==3 || Digits==5) MyPoint=Point*10;

    double TheStopLoss=0;
    double TheTakeProfit=0;
    if( TotalOrdersCount()==0 )
    {
    int result=0;
    if((iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0)<iMA(NU LL,0,5,0,MODE_SMA,PRICE_CLOSE,0)))
    if((iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,0)>iMA(NUL L,0,5,0,MODE_SMA,PRICE_CLOSE,0))) // Here is your open buy rule
    {
    result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage ,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue);
    if(result>0)
    {
    TheStopLoss=0;
    TheTakeProfit=0;
    if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint;
    if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint;
    OrderSelect(result,SELECT_BY_TICKET);
    OrderModify(OrderTicket(),OrderOpenPrice(),Normali zeDouble(TheStopLoss,Digits),NormalizeDouble(TheTa keProfit,Digits),0,Green);
    }
    return(0);
    }
    if((iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0)>iMA(NU LL,0,5,0,MODE_SMA,PRICE_CLOSE,0))) // Here is your open Sell rule
    {
    result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippag e,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red);
    if(result>0)
    {
    TheStopLoss=0;
    TheTakeProfit=0;
    if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint;
    if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint;
    OrderSelect(result,SELECT_BY_TICKET);
    OrderModify(OrderTicket(),OrderOpenPrice(),Normali zeDouble(TheStopLoss,Digits),NormalizeDouble(TheTa keProfit,Digits),0,Green);
    }
    return(0);
    }
    }

    for(int cnt=0;cnt<OrdersTotal();cnt++)
    {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if(OrderType()<=OP_SELL &&
    OrderSymbol()==Symbol() &&
    OrderMagicNumber()==MagicNumber
    )
    {
    if(OrderType()==OP_BUY)
    {
    if((iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0)<iMA(NU LL,0,5,0,MODE_SMA,PRICE_CLOSE,0))) //here is your close buy rule
    {
    OrderClose(OrderTicket(),OrderLots(),OrderClosePri ce(),Slippage,Red);
    }
    if(TrailingStop>0)
    {
    if(Bid-OrderOpenPrice()>MyPoint*TrailingStop)
    {
    if(OrderStopLoss()<Bid-MyPoint*TrailingStop)
    {
    OrderModify(OrderTicket(),OrderOpenPrice(),Bid-TrailingStop*MyPoint,OrderTakeProfit(),0,Green);
    return(0);
    }
    }
    }
    }
    else
    {
    if((iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0)<iMA(NU LL,0,5,0,MODE_SMA,PRICE_CLOSE,0))) // here is your close sell rule
    {
    OrderClose(OrderTicket(),OrderLots(),OrderClosePri ce(),Slippage,Red);
    }
    if(TrailingStop>0)
    {
    if((OrderOpenPrice()-Ask)>(MyPoint*TrailingStop))
    {
    if((OrderStopLoss()>(Ask+MyPoint*TrailingStop)) || (OrderStopLoss()==0))
    {
    OrderModify(OrderTicket(),OrderOpenPrice(),Ask+MyP oint*TrailingStop,OrderTakeProfit(),0,Red);
    return(0);
    }
    }
    }
    }
    }
    }
    return(0);
    }

    int TotalOrdersCount()
    {
    int result=0;
    for(int i=0;i<OrdersTotal();i++)
    {
    OrderSelect(i,SELECT_BY_POS ,MODE_TRADES);
    if (OrderMagicNumber()==MagicNumber) result++;

    }
    return (result);

    i hope anyone can solve my problem
    thanks before

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  8. The Following 6 Users Say Thank You to nonamefx For This Useful Post:

    Alizahid (2020-10-20), bahi00 (2020-10-19), Boss12 (2020-10-19), Kanwal (2020-10-19), LOC (2020-10-20), raheel00 (2020-10-19)

+ Reply to Thread
Page 5 of 5 FirstFirst ... 3 4 5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Currently Active UsersCurrently Active Users

There are currently users online. members and guests

Forex Forum India | Forex Community Place Statistics Forex Forum India Statistics

Most users ever online was .

Welcome to our newest member,

Threads:

Posts:

Member: