Forum

Trailing stop loss only work in next bar, not every single tick as intended.

Hello everyone! So I have a stop loss check in the Ontick function like this: Some part of the code is hide away for simplicity. //+------------------------------------------------------------------+ //| Expert tick function |

PositionGetDouble(POSITION_SL) does not work for me???

Hi, I am pretty new here and to the platform. So I wanna deal with trailing stop loss, so I will have to get access to the stop loss of the current postion. Here is the way I open a position, which has no problem as far as I know. if (signal!= WRONG_VALUE ) { if ( TerminalInfoInteger (

Help with writing a new moving average

Hello, I am very new here and want to practice a bit in coding. I decided to write a moving average. Writing from scratch is hard so I pull up an ema script people writes. There is this line inpPrice = PRICE_CLOSE _ema.calculate() getPrice(inpPrice,open,high,low,close,i) I would like to know what