Kalladin:
Hello, I need some help finishing the attached code!
Hello, I need some help finishing the attached code!
As you can see from the code it is a martingale EA which doubles the lots traded per successive trade until a win is achieved.
I am a very amateur coder so please excuse the errors.
Why would you think this would work ?
if ( (OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) == 1 ) && Profit<0); //selecting the last trade if ( (OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) == 2 ) && Profit>0); //selecting the second to last trade
read the documentation for OrderSelect(), what does it return ?
TakeProfit is a double not a bool . . .
if TakeProfit = true OrderClose(OrderTicket(),OrderLots(),Bid,3,White); // if take profit or stop loss is reached, close order
Where does the value for Profit come from ?
I don't think you need help, I think you want someone to write your code for you . . . go here: Please finish my code for me.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thank You very much for your consideration, I am greatly appreciative of any and all help,
Kalladin