
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
Thanks for the corrections.
If we are using count=count-1; then there is no need to use 'for' loop which I was trying to get cleared two post back
And sometime it's worthy of trying. Like just now I have fixed some mistakes by my own and it gave me such a pleasure!
Thanks once again. Take Profit part is working so far as expected.
Thanks for the corrections.
If we are using count=count-1; then there is no need to use 'for' loop which I was trying to get cleared two post back
And sometime it's worthy of trying. Like just now I have fixed some mistakes by my own and it gave me such a pleasure!
Thanks once again. Take Profit part is working so far as expected.
keep testing and reading codes you see and you learn a lot,
you can do yourself a lot learning
if you try to understand and explore the things
with testing and creating it on your own 'demo' testing account
keep testing and reading codes you see and you learn a lot,
you can do yourself a lot learning
if you try to understand and explore the things
with testing and creating it on your own 'demo' testing account
Yes I'm trying to understand what I'm getting across.
Now for the 'Stop Loss Trailing' part I have thought something.
The condition for starting the 'Trailing Stop' loop:
if(OrdersTotal()>0){
for(cnt=OrdersTotal()-1;cnt>=0;cnt--)
{
Trailing Stops;
}
}
Now what I was thinking that this loop will run as many times as the number of total opened orders. And my aim is 'Not to Trail' Stops for the Last/Third order.
So if I stop the loop at 'Second' order, how it'd be?
for(cnt=OrdersTotal()-1;cnt>0;cnt--)
Yes I'm trying to understand what I'm getting across.
Now for the 'Stop Loss Trailing' part I have thought something.
The condition for starting the 'Trailing Stop' loop:
if(OrdersTotal()>0){
for(cnt=OrdersTotal()-1;cnt>=0;cnt--)
{
Trailing Stops;
}
}
Now what I was thinking that this loop will run as many times as the number of total opened orders. And my aim is 'Not to Trail' Stops for the Last/Third order.
So if I stop the loop at 'Second' order, how it'd be?
for(cnt=OrdersTotal()-1;cnt>0;cnt--)
find the right symbol and right magicnumber
then it is a trade of your EA now check if Bid/Ask is xx pips away from orderopenprice()
do some searching here and you find examples you can use
find the right symbol and right magicnumber
then it is a trade of your EA now check if Bid/Ask is xx pips away from orderopenprice()
do some searching here and you find examples you can use
I have the checking and the conditional part.
But here I'm not understanding how to distinguish between trades. The 'Trailing Stop' function is called at the starting of the program.
*After reaching a certain profit limit say 10 pips, the Stop Loss will move to 5 pips. Now if that trade retraces back to 5 pips then 'Two Third' of the trade will be Closed.
*Remaining 'One Third' will keep Running and 'Trailing Stop' wont be applied for it then.
You have three trades so how do you wanna handle the three trades
so it is doing like you wanted ??
or which one has to be modified, after certain profit...
*After reaching a certain profit limit say 10 pips, the Stop Loss will move to 5 pips. Now if that trade retraces back to 5 pips then 'Two Third' of the trade will be Closed.
*Remaining 'One Third' will keep Running and 'Trailing Stop' wont be applied for it then.
You have three trades so how do you wanna handle the three trades
so it is doing like you wanted ??
or which one has to be modified, after certain profit...
To simplify matter I decided to go with 'Three' separate trade of same lot thus if two of them get closed, 'Two Third' of total trades (Lots) will be closed.
And the remaining trade (One Third) will keep running i.e. that 'Trailing Stop' wont be applied for it.
Stop Loss will be moved to a certain pips in profit for First Two trades but for the Third one, it wont move.
To simplify matter I decided to go with 'Three' separate trade of same lot thus if two of them get closed, 'Two Third' of total trades (Lots) will be closed.
And the remaining trade (One Third) will keep running i.e. that 'Trailing Stop' wont be applied for it.
Stop Loss will be moved to a certain pips in profit for First Two trades but for the Third one, it wont move.
You have to use some functions to get the modify done right
at this moment you have to check somehow a way to select a trade you have to modify
check the functions here Trade Functions and see if you can select trade 1
You have to use some functions to get the modify done right
at this moment you have to check somehow a way to select a trade you have to modify
check the functions here Trade Functions and see if you can select trade 1
Can index number be compared with ticket number?
Please refer to the Color Blocked parts above.
Thanks
Can index number be compared with ticket number?
Please refer to the Color Blocked parts above.
Thanks
your orderstotal is 3 trades
do this
what do you read if you open Terminal and look at Experts ??
will Sell_Order_Ticket_1 have a value same as cnt ??
if yes can you proof me, it is...
if not why not ??