Need help to open trade in Different Chart

 

Hello Everyone i  wrote a EA  based on ART strategy. It is opening only one trade in one chart. But i want to open  many trade on different chart. Like same EA in different chart and want to open trade on chart. But when i attached this ea on different chart it is not opening  trades although there is a signal in the chart.  Can you please anyone help me out.


here I am attaching my EA 

Files:
 
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.

I have moved your topic to the MQL4 and Metatrader 4 section.

Do not double post!

I will delete your other post.

 
Keith Watford:

Do not double post!

I will delete your other post.

I have just deleted another duplicate topic that you have opened despite being told not to double post.

You can expect a ban if you continue to double post.

 
28021990l: I  But when i attached this ea on different chart it is not opening  trades although there is a signal in the chart.  
  1. openOrderID=OrderSend(_Symbol,OP_BUY,lotsize,Ask,10,Ask-_Point*stoploss,Ask+_Point*takeprofit,NULL,magicNB,0, Green);

    You buy at the Ask and sell at the Bid. Pending Buy Stop orders become market orders when hit and open at the Ask.

    1. Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid / OrderClosePrice reaches it. Using Ask±n, makes your SL shorter and your TP longer, by the spread. Don't you want the specified amount used in either direction?

    2. Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask / OrderClosePrice reaches it. To trigger close to a specific Bid price, add the average spread.
                MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25

    3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
      Most brokers with variable spreads widen considerably at end of day (5 PM ET) ± 30 minutes. My GBPJPY (OANDA) shows average spread = 26 points, but average maximum spread = 134 (your broker will be similar).

  2. Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?

Reason: