Forum

slicing a 500 element array into a 20 element array

I am trying to run a loop on a 500 element array. The loop should take elements 480 to 499 then store then in a 20 element array (past) then elements 479 to 498 etc. Basically it start with the last 20 elements in the returns array then shifts back 1 for the next 20 elements and so on. For some

Deposit load missing

How is it possible that the balance line can change without the deposit value changing in strategy tester

adjust stoploss wthout changing tekeprofit

Hi, is it possible to adjust the stoploss in mq5 without specifying a new value for the takeprofit. eg: if I have a buy position, I want to raise the stoploss when my trade is profitable but i dont want to raise my takeprofit. Positionmodify() seems to require a value for TP but the existing TP them