I think there must be a simple solution to this but right now I am stucked with the following questions
1. How to avoid a position being scaled out more than once? (e.g. position 5)
2. With multiple opened orders, how to know when to scale out as they all have different target
e.g. position 1 & position 2 are actually in different zones, target for 1 is red and target for 2 is yellow.
if I was to scale out position 2 by comparing the OrderOpenPrice to one of the target trendlines, how do I know which trendline value to compare (yellow or red ?)
I think there must be a simple solution to this but right now I am stucked with the following questions
1. How to avoid a position being scaled out more than once? (e.g. position 5)
2. With multiple opened orders, how to know when to scale out as they all have different target
e.g. position 1 & position 2 are actually in different zones, target for 1 is red and target for 2 is yellow.
if I was to scale out position 2 by comparing the OrderOpenPrice to one of the target trendlines, how do I know which trendline value to compare (yellow or red ?)
You know where the trendlines are - you just calculated them. You know
where you opened. it's in OrderOpenPrice() so you know where the scale price
is.
double L1_value=GetTL1();
double L2_value=GetTL2();
double L3_value=GetTL3();
for ticketA: scale_price=L1_value; //open price was between L1 & L2for ticketB: scale_price=L2_value; //Open price was between L2 & L3for ticketC: scale_price=L3_value; //open price was below L3
market above scale price and SL
below BE - no previous scale, do it now.
OrderSelect()
if (Bid>Scale_price&&SL<OrderOpenPrice()) MoveToScaleOut();
//This is what I mean, the EA will not know wich scale_price to use for comparasion//they are different case by case
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
To be able to scale out, TP=0 when OrderSend/OrderModify, how do I keep track when to scale out for each ticket?
You know where the trendlines are - you just calculated them. You know where you opened it's in OrderOpenPrice() so you know where the scale price is.
market above scale price and SL below BE - no previous scale, do it now.
I think there must be a simple solution to this but right now I am stucked with the following questions
1. How to avoid a position being scaled out more than once? (e.g. position 5)
2. With multiple opened orders, how to know when to scale out as they all have different target
e.g. position 1 & position 2 are actually in different zones, target for 1 is red and target for 2 is yellow.
if I was to scale out position 2 by comparing the OrderOpenPrice to one of the target trendlines, how do I know which trendline value to compare (yellow or red ?)
Thank you all for your comment
I think there must be a simple solution to this but right now I am stucked with the following questions
1. How to avoid a position being scaled out more than once? (e.g. position 5)
2. With multiple opened orders, how to know when to scale out as they all have different target
e.g. position 1 & position 2 are actually in different zones, target for 1 is red and target for 2 is yellow.
if I was to scale out position 2 by comparing the OrderOpenPrice to one of the target trendlines, how do I know which trendline value to compare (yellow or red ?)
Thank you all for your comment
You know where the trendlines are - you just calculated them. You know where you opened. it's in OrderOpenPrice() so you know where the scale price is.
market above scale price and SL below BE - no previous scale, do it now.
I think I get it
big thanks WHRoeder & RaptorUK