FXArchitect EA (requires completion)

 
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. 

Please see attached code for additional details to the strategy.

Thank You very much for your consideration, I am greatly appreciative of any and all help,

 

Kalladin 

Files:
fxarchitect.txt  15 kb
 
Kalladin:
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.