I am using the basic send pending script (seen here) http://pastebin.com/0aLPLuGm
It enters the trade no problem, but it doesn't calculate stop loss/profit.
My question is, how can I calculate a -100 stop loss and +30 take profit based on the entry price.
Thanks in advance,
Terry
CurTime() is an obsolete function, you should not be using it . .
Check the return values from your trading functions and if they fail report the error and any relevant variables: What are Function return values ? How do I use them ?
For your SELLSTOP the SL is your open price (Bid - 30 * point) + 100 * point and your TP is open price - 30 * point Bear in mind that these don't factor in the spread at all . . .
Thanks Raptor. That worked perfect.
It doesn't factor the spread no, how could I possibly start to look into this?
Appreciate the reply.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am using the basic send pending script (seen here) http://pastebin.com/0aLPLuGm
It enters the trade no problem, but it doesn't calculate stop loss/profit.
My question is, how can I calculate a -100 stop loss and +30 take profit based on the entry price.
Thanks in advance,
Terry