for starters. your ask and bid around the wrong way.

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 expert,
i try to write a code for stop loss. i wanted to write the open position hit SL or closed the position if MA crossed.
this is my SL for buy
double sl= ask -InpStopLoss * SymbolInfoDouble(_Symbol,SYMBOL_POINT) ||fastbuffer[1] >= slowbuffer [1] && fastbuffer [0] < slowbuffer [0];
this is my SL for sell
double sl= bid +InpStopLoss * SymbolInfoDouble(_Symbol,SYMBOL_POINT) || fastbuffer[1] <= slowbuffer [1] && fastbuffer [0] > slowbuffer [0];
can anyone can help me on this?