Need help with EA , many thanks - page 2

 
somehow I cannot attach a diagram to explain??
 
Use Ctrl + Alt + I to attach a jpg
 
holdenmcgorin:
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

 
above is a bearish example just in case
 
holdenmcgorin:

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

  1. Asked and answered
  2. Why do they have different targets? You have one set of TLs. Modify all the orders to the TP to the current TL value.
  3. Red/Yellow is not visible on the image. I just looked at the bottom TL.
  4. Which trendline value to compare? It's YOUR EA, it's YOUR idea - YOU DECIDE.
 

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 & L2
for ticketB: scale_price=L2_value;  //Open price was between L2 & L3
for 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
 

I think I get it

big thanks WHRoeder & RaptorUK

Reason: