Coding help - page 211

 

Ok mladen, worked fine.

Does something like this also work?

if(iClose(Symbol(), 0, 0) >= (OrderOpenPrice()+20*Point)) {

// Do something

}

I want to check if the price is 2 points above the open price.

 
arroganzmaschine:
Ok mladen, worked fine.

Does something like this also work?

if(iClose(Symbol(), 0, 0) >= (OrderOpenPrice()+20*Point)) {

// Do something

}

I want to check if the price is 2 points above the open price.

Yes But it would mean "if current close is greater than the order open price + 20 points (2 pipson a 5 digit broker) then do something"

 

Thank you very much!! Happy weekend!

 

Hey mladen,

does something like this work?

OrderModify(OrderTicket(), OrderOpenPrice(), (lastStopLoss-trailingStop)*Point, 0,0,0);

Explanation: the stoploss -> (lastStopLoss-TrailingStop) is a value of the last SL and the 0.8 point trailingstop in a short position. Is the SL set correct? or is this a wrong stoploss?

_____

Edit: Got it worked. I had to delete the Point value.

 

Dear Coders

Attached indicators found from here : https://www.mql5.com/en/forum/172972/page7

Both indicators doesn't work on current bar, can it be fix ?

Thanks for any help

secretcode

 
secretcode:
Dear Coders

Attached indicators found from here : https://www.mql5.com/en/forum/172972/page7

Both indicators doesn't work on current bar, can it be fix ?

Thanks for any help

secretcode

secretcode

It seems that it was done so on purpose

Find a line that goes like this :

for(nCurBar=Limit; nCurBar>0; nCurBar--)[/PHP]

and change it to this :

[PHP]for(nCurBar=Limit; nCurBar>=0; nCurBar--)
 
mladen:
secretcode

It seems that it was done so on purpose

Find a line that goes like this :

for(nCurBar=Limit; nCurBar>0; nCurBar--)[/PHP]

and change it to this :

[PHP]for(nCurBar=Limit; nCurBar>=0; nCurBar--)

Thank you Sir for quick reply and correction, now it's working on current bar!

Best Regards,

secretcode

 

hi i post this to mladen if i may post it here i know its not the right thread but i know you are the best here malden i wanted to back test my str with the hull movings ind (trend lord) on the simulator i have which is forex tester and i tried to find another one that i can put custom indicator in and didnt find better one but i cant put custom indicators in forex tster so can i replace the hull moving indicator with ordinary movings or not

 
zoroxzyad:
hi i post this to mladen if i may post it here i know its not the right thread but i know you are the best here malden i wanted to back test my str with the hull movings ind (trend lord) on the simulator i have which is forex tester and i tried to find another one that i can put custom indicator in and didnt find better one but i cant put custom indicators in forex tster so can i replace the hull moving indicator with ordinary movings or not

zoroxzyad

Hull moving average is calculated as :

Hull(n) = LWMA(2*LWMA(n/2) – LWMA(n),sqrt(n))

where LWMA is a linear weighted moving average and "n" is a Hull moving average period. Now, if you can use LWMA as function, then you can replace Hull moving average using that formula, otherwise it is different than ordinary moving average so you can not replace it in a simple way

 

ican use lwma so if i want the period to be 30 in hull what mv should i put in the chart two ma or just one with howmuch period iam not good at math and thanks very very very much man on your effort