im learning to to code by modifying existing EAs so please bear with me
im having trouble getting this technique to work
i figured out how to simply load up multiple orders upon a condition
CODE IS ATTACHED
so my entries grab two positions
but how do i hold onto one, and close the other at 20pips profit, unless reversal..in that case all close
it seems when i use TP and SL all positions close
im assuming this must be a magic number issue but everthing i try seems to not function properly
do i somehow need to make all the orders different magic numbers??
2. good reads i def need to dig pages deep into these
3. ive adjusted for this by just shifting my input decimal places, and only trade eur/usd
but assuming i copy and paste this in will be a great universal fix?
4. ok i see i got ahead of myself, so TakeProfitLevel is a function that determines a price from the TakeProfit
if i make a TakeProfitLevel2 with a different function and apply to my second position opened, will this Take Profit only effect the second position?
i know there are issues will FIFO rule so i will have to make it sequential exit
but i know when i set a manual TP all positions close and i dont like that
3) not universal see https://www.mql5.com/en/forum/169828#comment_4075614 #3
FIFO) If your TP on the second send is larger than the first that complies with FIFO. But my broker won't let them be different. You'll have to use the maximum and close the first order at a hidden SL.
ok so perhaps the issue is my broker only allowing one TP level? im using forex.com
any link to code using a "hidden SL" or tp?
static double hiddenSL, hiddenTP;
if(Bid < hiddenSL
|| Bid > hiddenTP) CloseOrder();
#define NO_SL 0
...OrderSend(..., NO_SL, NO_TP...);
ok so with that code i need to get the return value from the order A, and B
ill need to create
am i defining that right?
then for ticket A i use
ticket B i will let ride until hard stops
am i getting somewhere close?
sorry im still new at this, what you are saying is still pretty advance to me
is that the correct syntax to continue with your hidden exits?