
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
Hi Ladies and Gents,
Could someone take a look at my script and help me clean it up a little bit please?
Its based on a breakout strategy and places a stradle order if the market price hasn't hit and is not within the market spread yet, using 2 pending trades (buystop and sellstop).
If the market price has hit; if its an order going short, the script places an immediate sell order and exits without placing a pending order going long. if its a long trade, the script places the long trade and deletes the pending short trade.
The above orders work. However, how do i get the script to detect if the current market price is too close to the ask or bid price to place pending trades and execute an immediate trade instead? I can't figure this out at all!
This is one of 3 final items that I need to learn before I turn this into an EA, so any help will be of assistance. The other 2 being money management and how to place the trades at specific times (I think I saw this as a thread here actually).
I look forward to your constructive critisisms and advice.