Pips away problem
10 replies
SimonO
2 years ago #274343
Hello
I tried to make a strategy that would buy on every bar if current open is n-pips away from previous open orders. However, my template is not working as intended, as I believe that there is some problem with open order price calculation.
I’m adding all the photos and the strategy template.
Any help would be greatly appreciated.
SimonO
2 years ago #274344
I believe that it only checks the order open price of the first order so when the price is outside the n-pip value it doesn’t check the distance from the other orders..
SimonO
2 years ago #274384
Any help would be greatly appreciated.
Bee trader
2 years ago #274387
Hi,
I am trying to follow what you are trying to do here:
<span style=”color: #404048; font-family: ‘open sans’, -apple-system, blinkmacsystemfont, ‘segoe ui’, roboto, helvetica, arial, sans-serif; font-size: 15px;”>unless if I am mistaken, you can openorderprice like that since you want to use previous open order price.</span>
Why don’t you have it as a STOP order and set your open price as Open[0]+X pips?
SimonO
2 years ago #274395
I don’t really understand what you mean. I’m opening multiple market orders, but new market order should only be opened if it’s a n-pips away from order market orders. It should honestly be simple in principle, but I don’t know why it doesn’t work. As I’ve said, it might be because it doesn’t identify ALL open positions, only the first one… But I don’t know how to fix it.
Bee trader
2 years ago #274396
what you are trying to do is too complex for Algo Wizard. You might be able to develop a java extension.
SimonO
2 years ago #274397
I honestly don’t believe it’s too complicated as it literally just needs to check if there is any nearby positions. It basically just needs to identify different orders, which I think is well in the capabilities of algowizard. The way I put it should work in principle, that’s why I am asking for help, as it does not.
SimonO
2 years ago #274432
Ok, so this time I basically copied how fxDreema does this no positions nearby function, but of course, it still doesn’t work…
tomas262
2 years ago #274447
Hello,
you can attach your latest version, I will check and try to modify
SimonO
2 years ago #274461
Hello,
thank you for response.
I added my dummy example. I made it so that it can at least identify the last order, but I can’t identify ALL orders at once. Also, I have problems with the condition positions<maxPositions. EA is entering more positions than allowed but I don’t know what’s the problem.
Thank you for your help.
tomas262
2 years ago #274618
Hello,
this could do what you want. Check the modified example attached
Viewing 10 replies - 1 through 10 (of 10 total)