jtubbs13791 / Publications
Forum
HELPPPPP!!!!!! trying to close pending orders
can someone help me please? I can get this function to delete a pending order . What am i doing wrong? the way I would like it to work is when a open order is closed. this function will then delete the pending order. I keep getting the error 4108 for invalid ticket. I really have issue if another
delete pending orders
can someone help me please? I can get this function to delete a pending order . What am i doing wrong? the way I would like it to work is when a open order is closed. this function will then delete the pending order. I keep getting the error 4108 for invalid ticket. I really have issue if another
Deleting or closing a pending buylimit
void CloseStack1stLevel1M () { for ( int b= OrdersTotal ()- 1 ; b >= 0 ; b--) { if ( OrderSelect (b,SELECT_BY_POS,MODE_TRADES)) if (OrderMagicNumber() == MagicNumber1M) if (OrderSymbol() == Symbol ()) if (OrderType()==OP_BUY) if ( OrdersTotal () == 0 )
Calculate total dollar amount of all open trades
the function below only calculates the dollar amount of the last open trade. I am looking to calculate the dollar amount of all open trades for the currency the EA is on. I can not find what I am doing wrong. can I get some help? thanks in advance. double LastBuyProfit() { for ( int iPos=
Trying to calculate total profit for trades
having issue with a function that will calculate total profit. this is what i have so far. thanks for any help int BuyProfit () { static int TotalBuyProfit = 0 ; for ( int iPos= OrdersTotal ()- 1 ; iPos >= 0 ; --iPos) if ( OrderSelect (iPos, SELECT_BY_POS) && OrderMagicNumber() ==
recording open trades so EA does open a new at the same position
I am having a issue with some coding for an EA. I am wanting it to Not open another trade at the same positions. So if I have 5 open positions. The EA is not opening a trade at the same position as the previous trades, but the EA is opening trades at the same position as the others. I need a way to
adding a delay to ordersend
I am having issue with my EA. I need it to open trades at the beginning of the trading day. the issue that I am having is that when the ea sends the order. My broker gives me the error that the market is closed or busy. So I am trying to add a delay to the ordersend to execute a minute or less later
Awesome EA with one problem. need help?
I created an ea that is doing really good except for one thing. Sometime it executes trades at the same order price as a current open trade. I have come up with a way to fix it, but can seem to find a way to code it correctly. How I would like the logic of the coding to execute is: if ask price is