- Help you with what?
You haven't stated a problem, you stated a want.
You have only four choices:- Search for it,
-
Beg at
- Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum
- Requests & Ideas (MQL5 only!) - Trade FX - Expert Advisors and Automated Trading - MQL5 programming forum
- Free coding for your trading system.. - Easy Trading Strategy - General - MQL5 programming forum
- I will code & automate your strategy for free - Options Trading Strategies - General - MQL5 programming forum
- Make It No Repaint Please! - MetaTrader 5 - MQL4 and MetaTrader 4 - MQL4 programming forum
- learn to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
- or pay (Freelance) someone to code it.
No free help
urgent help. (int mode, : if(mode==0) if(mode==1)
Don't use ints when you mean an enumeration.
Thank you for your reply.
i would like to know the Profit in Dollar of the oldest open/pending order in the Chart for the sell and buy. and yes i don't know really how...
twice i was looiking for someone who could code it, but I am still at the same Position....
//+------------------------------------------------------------------+ double countprofitoldestshort(int mode,int order_type) { double profit=0; if(OrdersTotal()>0) { for(i=OrdersTotal()-1;i>=0;i--) { OrderSelect(i,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==Symbol() && && OrderType()==OP_SELL && OrderMagicNumber()==magic) { if(mode==0)profit=profit+(OrderClosePrice()-OrderOpenPrice())/pt; if(mode==1)profit=profit+OrderProfit()+OrderCommission()+OrderSwap(); } } } return(profit); } //+------------------------------------------------------------------+ double countprofitoldestlong(int mode,int order_type) { double profit=0; if(OrdersTotal()>0) { for(i=OrdersTotal()-1;i>=0;i--) { OrderSelect(i,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==Symbol() && && OrderType()==OP_BUY && OrderMagicNumber()==magic) { if(mode==0)profit=profit+(OrderClosePrice()-OrderOpenPrice())/pt; if(mode==1)profit=profit+OrderProfit()+OrderCommission()+OrderSwap(); } } } return(profit); }
Thank you for your reply.
i would like to know the Profit in Dollar of the oldest open/pending order in the Chart for the sell and buy. and yes i don't know really how...
twice i was looiking for someone who could code it, but I am still at the same Position....
Forum on trading, automated trading systems and testing trading strategies
Welcome,
- Usually people who can't code don't receive free help on this forum, though it could happen if you are lucky, be patient.
- If you show your attempts and describe well your problem, you will most probably receive an answer from the community.
- If you don't want to learn to code, nothing bad, you can either look at the Codebase if something free already exists, or in the Market for paid products (sometimes free also).
- Finally, you also have the option to hire a programmer in the Freelance section.
Good luck.
i was looiking for someone who could code it,
- If you had it on a piece of paper, how would you do it? Assume the first. Compare it to the second and choose the older. Compare that to the third. Etc. Code that.
- Asked and answered twice. <edited by moderator> Learn to code or pay someone.
- If you had it on a piece of paper, how would you do it? Assume the first. Compare it to the second and choose the older. Compare that to the third. Etc. Code that.
- Asked and answered twice. <edited by moderator> Learn to code or pay someone.
Please answer on the topic only.
There are moderators to moderate.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
i would like to calculate the Profit of the oldest Sell / oldest Buy Position in the Chart....
same like that:
i would like to get the Funktion for countprofitBS-oldest.....
could someone help me?