前のローソク足の安値を下回ったら損切り
24 replies
こんにちは
Can anyone help with how I tell EA Wizard to place a stop loss below the low of the 2nd candle back?
ありがとう
0
So how do you learn this stuff without a manual or forum replies?
0
こんにちは,
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[2] 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.
マーク
StrategyQuantアーキテクト
0
Thats great thanks.
How can I set the Take profit to be a multiple of the size of the stop loss?
0
in a similar way, but you have to use formula to compute the actual SL (Ask – SL level).
マーク
StrategyQuantアーキテクト
0
Thanks, can you tell me briefly what the settings mean in the variables..
1. Int
2. Double
3. Boolean
4. String
ありがとう。.
0
Int – integer number, for example 1 – 100000
Double – decimal number – 0.23, 4.67, 10234.56
Boolean – true/false value
String – text string
マーク
StrategyQuantアーキテクト
0
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?
ありがとう。.
0
こんにちは,
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
修正版の戦略を添付します。.
マーク
StrategyQuantアーキテクト
0
Can you explain
…. – X pips offset.
what does that mean?
ありがとう
0
How do you attach a file here? I can’t see it!
0
Found the attach, you have to use the reply button.
Please could you have a look at the attached strategy and tell me what I’m doing wrong with the TP being a multiple of the SL.
ありがとう
0
Its ok, ive cracked it. Just done it. Thanks for your help.
0
one more on this topic..
If my stop is below the low of shift 2. How can I make it e.g 3 pips below that low?
0
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[2] – 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.
マーク
StrategyQuantアーキテクト
0
ありがとう、マーク。,
Im not sure if im getting it right. Could you have a look at the attached strategy. It doesn’t take any trades, and I think the problem may be around this pip value issue.
0