Takeprofit and Stoploss

Posted By: sdelatorre

Takeprofit and Stoploss - 06/23/18 08:54

Hi,

I'm developing a system which it builds an string( asset) and after compare this string with all assets from AssetList. It's easy. I do it with a loop

while (compare=loop(assets))
found(compare)


The problem is when I found the asset --> Select the asset , Set by
example:

asset("EUR/USD")
TakeProfit=15*PIP
StopLoss=30*PIP
EnterLong()

but I look that is not correct SL and TP, when the trade is opened ok but it closes with TP and SL different that I set.

I'm tested Zorro and MT4. When the trade is open in MT4 is 45 PIP of stop loss and trades are closed with takeprofit +-9

Why the reason ??


Thanks in advance.
Posted By: MatPed

Re: Takeprofit and Stoploss - 06/23/18 17:26

StopLoss = 30*PIP; Are u sure?
Have a look at StopFactor for the difference in PIP number.
For such a tiny take-profit I guess that spread is your enemy...
Posted By: sdelatorre

Re: Takeprofit and Stoploss - 06/24/18 16:54


Hello MatPed, then I have to set the StopFactor=1, haven't it? I hadn't set any way the Stopfactor.

And I guess that I have to set TakeProfit=15*PIP+spread
Posted By: MatPed

Re: Takeprofit and Stoploss - 06/25/18 07:08

StopFactor is a nice feature of Zorro, the default value is listed in the manual.
You can not forecast the spread. I guess you have to deal with the fact that you will never have the exact number of pips you are hunting: while you send your order the price and the spread is moving.

my 2 cents
Posted By: sdelatorre

Re: Takeprofit and Stoploss - 06/25/18 16:35

Thanks again

now with StopFactor correct in MT4 all trades have the SL correct but all trades opened are closed in the same bar without TP of course.

I use flag TICKS.

When I push TRADE Zorro tells me that trades are closed for Stop.

Upload files


Attached picture captura_MT4.PNG
Attached picture ZORRO_CAPTURA.PNG
© 2024 lite-C Forums