読み取り専用

フォーラムは現在、読み取り専用のアーカイブとなっています。.

バグ報告やプラットフォームに関する質問はこちら → [email protected]

私たちのコミュニティはDiscordとYouTubeで活動しています。ぜひ参加してください!

ご参加ください Discord YouTube

Moving TP & SL

18 replies

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #113786

こんにちは、, 

I am trying to do this:

if OpenProfit(magicBuy) > Variable1 then

 Move SL to  CurrentPrice – Variable1 and

 MoveTP to min(currentPrice+TP + Variable2,CurrentPrice+MaxTP) (ie. if maxTp is reached  I close the order)

.

 How is this accomplished?

 

I attach a sample SQW for your consideration…

 

Please consider that MagicNumbers are variables as the EA could run on different Pairs.

 

Thanks a lot,

 

Claudius

ファイル TEMAprofit_EAv2.sqw

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #130837

こんにちは、,

 

if you just want to move SL when OP (Variable1) reaches certain amount of money/pips I would use MoveToBreakEven function for the entry order since your condition actually moves it to break-even.

Bit confused about variable you use for profit-target. How is ‘Variable2’ used and calculated? I cannot see it in your sample. Can you verbally describe behavior of the profit-target so I can suggest rules for that?

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #130887

I thought could be easier to explain it graphically… Please have a look at the attached  sketch.

 

ありがとう、,

ファイル SL and TP move .pdf

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #130949

こんにちは、,

 

I am still not sure if I get right so:

1) you enter to a long position and set the Initial PT + Initial SL

2) when price moves X pips you move SL to a new price

3) you also move PT to a new price

 

Now I am not sure what this means ‘Close order if initial TP reaches max TP’? Can you give me real life example using some abstract prices? How can Init PT reach Max PT? Are Max PT & Init PT fix values?

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #130961

Thanks for the reply.

Exactly!! Both SL and initialTP move with the price movement.

Initial Take Profit is set ,say, to 70 pips and maxTP to 200 pips.

As we move InitialTP to a new price, if it reaches the maxTP (200 pips) the order is closed.

I hope this is clear!

 

ありがとう、,

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #131054

こんにちは、,

 

created a strategy example for you which does following:

 

1) enters into a long position and sets SL to 40 pips and PT to 40 pips

2) when position gets into profit > 0, trailing SL is being activated so with each additional pips of profit (x), your SL is moved higher by X pips so new SL is always kept 40 pips from max open profit price and max loss is limited then to 40 pips

3) with each additional pip into profit, your initial PT is also moved to a higher price

4) when PT moving higher reaches max PT (in this case 80 pips), position is closed

 

Is this what you wanted?

ファイル MovingSLandPT.sqw

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #131141

ありがとう、,

 

We are heading in the right direction!!!

 

The only problem I cannot clone your strategy with different MagicNumber – MagicNoSell….

 

Could you please have look?

 

ありがとう、,

 

ファイル TBS_TEMA_1H.sqw

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #131150

こんにちは、,

 

I added and tweaked conditions for short side too. Look at file attached.

ファイル TBS_TEMA_1H.sqw

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #131164

ありがとう、,

 

Tried to use the file you attached, but it cannot be saved as Expert Advisor, giving a lot of error exceptions… 

 

Please see attached .

 

ありがとう

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #131188

Thanks !!

 

 It seems I needed the update to get it correct!

 

Thanks.again.

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #131355

こんにちは、,

 

I tried to clone your “Adjust PT – Buy” Rule to a new “Adjust SL – Buy” by:

 MoveSLTo:

 Magic Nuber : MagicNoBuy

 Price : openPrice(MagicNoBuy) + ConvertPLToRealPips(OpenPL(MagicNoBuy))))

On entering the last line I always get “Property Value is not valid” error….

 

(MovePT is left there so that I can copy what I want …!)

 

What do I do wrong ????

 

Please see attached..

 

ありがとう、,

 

 

 

 

 

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #131484

Is this what you wanted?

 

 

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #131506

Yes, Thanks.

 

Just tried to clone this for “Adjust SL- Sell” but could not change MagixNoBuy to MagicNoSell, neither change addition to subtraction ….

 

Also tried to enter conditions for Close Order For StopLoss (Current PRice Falls below NewSLPrice) for both Buy and Sell, but the program did not accept my formulas… For example when I try to change MagicNoBuy to MagicNoSell, I can only change magicNo from 1000 to 1001 + or 999 -… What am I doing wrong with formula entry?

 

ありがとう、,

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #131556

hi, will check the file you attached

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #131616

You can change MagicBuy to MagicSell easily. You have to just “double-click” through conditions since they are nested into each other. For example in Adjust SL – SELL double click on NewSLPrice then on “Value” line click on “…”, then click again on “…” on the Parameter1 line where you can change the magic number. Then you can do the same for Parameter2.

 

Can you somehow post a screenshot of how you compose the formula?

0

CTC

定期購読者、bbp_participant、コミュニティ、14件の返信。.

プロフィールを表示

11年前 #131626

A screenshot is attached. 

 

PLEASE HELP !!!!

 

ファイル EA wizard error.pdf

0

15件の返信を表示中 - 1 - 15件目 (全18件中)

1 2 →