- Need help for martingal
- Martingale problem
- Martini ...
-
Martingale, guaranteed to blow your account eventually. If it's not profitable without, it is definitely not profitable with.
Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11Why it won't work: Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11
-
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12
-
Martingale, guaranteed to blow your account eventually. If it's not profitable without, it is definitely not profitable with.
Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11Why it won't work: Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11
-
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12
Forum on trading, automated trading systems and testing trading strategies
Please fix this indicator or EA
Sergey Golubev, 2017.03.24 07:23
And this is my other suggestion (which came from tsd 2010 and from tsd 2008):
----------------
Just to remind:
Coders (any coder) are coding for free:
- if it is interesting for them personally, or
- if it is interesting for many members of this forum.
----------------
and Freelance section of the forum should be used in most of the cases.
What part of “Help you with what? You haven't stated a problem, you stated a want,” was unclear to you?

- www.mql5.com
What part of “Help you with what? You haven't stated a problem, you stated a want,” was unclear to you?
ok sir; This is the code for martingal; it should be like this: for eg: when the last profit of gbpusd was lost; the martingal should be applied for gbpusd only
Another eg: Those are the history of the account(intial lot 0.01, and multiplier x2)
GBPUSD -5
So if the next pair is not GBPUSD, there is no martingal applied; but if the next signal is GBPUSD the martingal is applied
Like this:
1st GBPUSD -5 lot 0.01
2nd GBPUSD 11 lot 0.02
OR
1st GBPUSD -5 lot 0.01
2nd EURUSD 7 lot 0.01 //no martingal here because it is not a gbpusd
3rd GBPUSD 13 lot 0.02 //the martingal is applied because there is a GBPUSD
So help me please because my code do not work like this condition
extern double Lot=0.01; extern bool Martingale=true; //martingale extern double Multiplier=2; //multiplier int MagicNumber=1234567890; double last_profit,last_lot; string last_tip,last_pair; int start(){ double lot; if( TotalOrdersCount()==0 ) { //martingale if(Martingale=true){ if(last_profit>=0){ lot=Lot;} if(last_profit<0){ lot=Lot*Multiplier;} } else if(Martingale=false) { lot=Lot; } } } 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); } double last_history_profit() { double cpte_profit = 0; //int Magik_No = -1; if( OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY) ) { if( OrderMagicNumber() == MagicNumber ) { last_profit = OrderProfit(); last_lot = OrderLots(); last_tip = OrderType(); last_pair= OrderSymbol(); } } return(1); }
Please edit your post and
use the code button (Alt+S) when pasting code
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
Do not double post!
I have deleted your duplicated topic!
Do not double post!
I have deleted your duplicated topic!
ok sir

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use