Download MetaTrader 5

Stop loss from horizontal line

To add comments, please log in or register
ovatsug
47
ovatsug  

Hello, I am currently using an EA that places two line on the chart. When price touches the top one it order a buy order an the botton one a sell order.

 

Is it possible instead of using a fixed stop loss value, draw two other lines on the chart, one BuyOrderStopLoss and SellOrder StopLoss, so that when a buy or sell order is activated

the stop loss is put automatically??

I managed to draw the lines... 

Alain Verleyen
Moderator
33339
Alain Verleyen  
Yes it's possible. What is your problem ?
ovatsug
47
ovatsug  

How to I do it ?

Alain Verleyen
Moderator
33339
Alain Verleyen  
ovatsug:

How to I do it ?

Show your attempt if you want help.
ovatsug
47
ovatsug  
Alain Verleyen:
Show your attempt if you want help.

[ decompiled code removed ]

 

I manage to draw the line, but it is referenced instead of pips its uses the price as the value 

honest_knave
Moderator
2326
honest_knave  
ovatsug:

[ decompiled code removed ]

 

I manage to draw the line, but it is referenced instead of pips its uses the price as the value 

You may not be aware, but the code you posted was decompiled.

It is strictly prohibited to post decompiled code on the forums, so I have removed it.

whroeder1
15925
whroeder1  
ovatsug:

[ decompiled code removed ]

 I manage to draw the line, but it is referenced instead of pips its uses the price as the value 

  1. Decompiled code is stolen code. Either you are a thief, a fence, or the receiver of stolen (intellectual) property. Either way we will not be an accomplice after the fact to theft. See also https://www.mql5.com/en/forum/134317#comment_3411571

    If you post decompiled code again, you will likely be banned.

    Don't tell us you found it on the 'net: if someone stole your bank details and uploaded them on to the internet, is it OK for everyone to use them because "someone uploaded it, I don't know why I can't use that"?

  2. A line and a SL is a price.
To add comments, please log in or register