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
I know, why closes all lots one after another. I want to partial exit on Fibonacci tp1=38.2, tp2=61.8 and tp3=127.2%.
After TP1 partial close, my tp2 ant tp3 values becomes 0 and below if conditions becomes true because Bid> tp2 and tp3. But really Bid is < tp2 and tp3 and he have to wait while second condition would be true.
So, how to get tp2 and tp3 values from Fibonacci, that after first close order function they don't be zero?
Thank you.
I know, why closes all lots one after another. I want to partial exit on Fibonacci tp1=38.2, tp2=61.8 and tp3=127.2%.
After TP1 partial close, my tp2 ant tp3 values becomes 0 and below if conditions becomes true because Bid> tp2 and tp3. But really Bid is < tp2 and tp3 and he have to wait while second condition would be true.
So, how to get tp2 and tp3 values from Fibonacci, that after first close order function they don't be zero?
Thank you.
Learn to read why don't you use MagicNumber in your code
Have you test the code for partial closing and is it working correctly ??
go make a code working for partial closing before you go work on other subject
test that code live on demo also...
I'll add MagicNumber later, without Magic number is easier to test it now.
Partial closing is working, when I write random price except of tp2 or tp3.
I'll add MagicNumber later, without Magic number is easier to test it now.
Partial closing is working, when I write random price except of tp2 or tp3.
Then it is not.....
why is it not working for tp2 and tp3 ?? check it
The biggest problem is how to identify if the order has been part closed already or not, and if it has, how many times ?
When I coded for that I didnt base it on the magic number because magic number cannot be modified.
Instead I modified the TP by +1 pip each time before I part closed the order. Then use the difference between original TP and current TP to identify how many times the order has been part closed, that allows you to set the target for the next part close based on how much the difference is. I use an EA managed soft TP so changing the hard TP has no effect on the strategy.
so for example, you want to part close every 30 pips,
if TP == original TP it has not been closed yet so target = openprice +30 pips
if TP== original TP+1 it has been closed once already so target = openprice + 60 pips
Put that difference in an integer and start it 1 you will see, target = openprice + (TPdifference*30*Point)
That system uses small amount of code and lends itself easily to an EA managing multiple simultanious orders.
Explain what your code is doing every tick when it pass this part of code
and How is your Pivot working ?? Did you simply copy/paste indicatorlines in your EA ??