this is relatively simple.
You only have to set SL to be at specific price level (in Stop Loss dialog) and choose Low with Shift=2.
Low means low of candle 2 bars ago.
I’m attaching a sample strategy, I added also configurable offset in pips to set SL few pips below the Low.
For that I used variable SLOffsetInPips and function ConvertToRealPips that will convert pip value to “real” pips according to the symbol traded.Attachments in this forum are visible only for registered users.
Very helpful, thanks.
Im trying to get my head around the Take profit multiplier. is it like this:
1. Assign variable to get Stop loss in pips (open ask – low shift 3)
2. Assign variable to get the take profit in pips ( stop loss in pips * e.g 2)
3. Set TP to Ask price + take profit in pips.
Is that right?
And, do I need to convert 2 into real pips?
in my example it was like this:
1. compute the correct Stop Loss level: Low with shift=2 – X pips offset and storing it to value SLLevel
2. Create order, set SL to
You should realize that SL computed in step 1 is a price level, for example 1.6432.
To get SL in real pips you should deduct it from the price at trade open, hence Ask – SL.
For example let’s say Ask price is 1.6510, then Ask – SL will be 0.0078. This is in “real” pips.
I realized that I made one mistake – for PT I had to use function ConvertToPips() that converts value from real pips to pips.
ConvertToPips(0.0078) = 78 pips
Then you can set PT = 2 * this value = 2 * 78
I’m attaching corrected strategy.Attachments in this forum are visible only for registered users.
If my stop is below the low of shift 2. How can I make it e.g 3 pips below that low?
I made this in my example – you can use functions +, -, *, / in EA Wizard.
So to get price level at 3 pips below the Low you can use formula: Low – ConvertToRealPips(3)
You should use function ConvertToRealPips() so that your pips value is converted to the correct price value that can be deducted from Low.
You must be logged in to reply to this topic.