Hi all,
I'm working on a strategy that includes opening multiple trades on different prices, but with a maximum of 9 orders...
My problem is i currently use a fixed lot, then calculate the lot size by array of percentage
The code above does something like this :
and so on...
I'm wanting something else coz this looks like it is too much for my strategy....
I want to spread my risk(e.g 5% of the balance) on multiple orders, up to 9...
Is it even possible?
If it is, please can someway give me a heads up on how to make it work?
Thanks,
noobshow.
EDIT: Solved
I'm working on a strategy that includes opening multiple trades on different prices, but with a maximum of 9 orders...
My problem is i currently use a fixed lot, then calculate the lot size by array of percentage
Inserted Code
extern double Lots = 0.1;//Lot Size double lot = Lots; //.... /* Here is the array with percentages of lots increment in order */ int AllZoneLots[8] = {120, 130, 140, 140, 160, 170, 180, 190}; // 120%, 130%, 140%, 140%, 160%, 170%, 180%, 190% /* Here, the lot size are used by looping the array and increasing the lot size by the count */ for(int i = 0; i < ArraySize(AllZoneLots); i++) { lots = (lots / 100) * AllZoneLots[i];//NormalizeLot() removed for brevity //PlaceOrder(OP_BUY,lots); }
The code above does something like this :
Inserted Code
lot1 = Initial Lot Size;//0.1 lot2 = 120% of lot1;//0.12 lot3 = 130% of lot2;//0.16 lot4 = 140% of lot3;//0.22 lot5 = 140% of lot4;//0.31
I'm wanting something else coz this looks like it is too much for my strategy....
I want to spread my risk(e.g 5% of the balance) on multiple orders, up to 9...
Is it even possible?
If it is, please can someway give me a heads up on how to make it work?
Thanks,
noobshow.
EDIT: Solved