Forum

cannot detect new bar form.

Hi, I have create a code which detect new bar been form. but seems there is a bug. What i wanted is, when we attach the EA to any chart, if at the time when attach to the chart.... the current bar still not yet finish perform.... it will wait for new bar to begin then alert new bar been form. If the

next lot to go order.

i have a problem, every time when i push an order, if it hits my Stop Loss value example ... FOR BUY order.. if (Bid<=setted_loss_point){ push_close = OrderClose(enter_Ticket_number,OrderLots(),Bid,Slippage,Blue); } then i get a return profit_value = OrderProfit(); from the above close order. i

how to return 2 or 3 value from function.

As we know that we can return what we need from function . can anyone show me how to return 2 or more value from the function and pass it to out side function? Thanks

can i get the profit or loss trade when close order?

Hi, i wanted to close a trade when it hits certain level of bid price. when execute the close order, can i get the value of profit or loss when i close the order? How? i need help on this issue because i am trying to implement a bit of martingale strategies in my EA to cover my previous losing trade

how to get the ticket id from magic number?

I have create a EA that only trade one "Buy" or "Sell" at 1 currency, therefore...... i need to trace a ticket where same to currency that attached. I got the magic number.... but how to get the ticket with the magic number and cut off the trade

problem with buy order.

i wanted to execute a buy but cannot with the code below. my broker need 25 pips from market price, but i already set to 25 and still cannot, why? please help. =OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);

New Bar detection help.

i wanted to create an EA that only trade when new early of the current candle bar. i have already code it to detect new bar been form. but.... when i test it on 5 minutes chart. seems that sometimes it can alert new bar been form, and sometimes it cannot. i cannot figure it out.... blur.... can

how to detect the order is belong to which currency?

Hi i am new to mql, I am trying to create an EA to trade automatic. The EA must only can have only one trade on each currency. which means that if i attach the EA to the chart, the EA must detect is there an Real Order running OR any pending order available for the currency that attached. If there

pending ticket cannot executed.

Why i execute pending ticket, it does not perform in the EA? My code .... #property copyright "xxx" #property link "xxx" #property show_confirm bool temp_order_flag = False; //+------------------------------------------------------------------+ //| script "send pending order" |

how to create a function that get boolean on EMA crossover?

i would like to create an EA to trade when finding the previous candle signal. EMA value... FasterEMA = 4, SlowerEMA = 5. As i know, i can code the checking current new bar candle performed or not, if new bar candle on chart performed, i will issue a signal flag to check EMA value, whether it have