読み取り専用

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

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

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

ご参加ください Discord YouTube

Creating EA to enter new trades ONLY

13件の返信

チョールトン

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

プロフィールを表示

12年前 #112258

皆様、こんにちは,

 

I’m new to MQL (hence my reason for using EA Wizard) and I want to create an EA that will enter new trades ただ as I will be planning to exit each open trade manually at a future point in time.

 

As each trade needs its own magic number, how would I do this? Assuming that my buy signal occurs multiple times per trading session then at the end of that trading session ideally there would be many different open trades.

 

Can this be done?

 

 

よろしくお願いいたします。,

 

チョールトン

0

マーク・フリック

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

プロフィールを表示

12年前 #124904

Hello Chorlton,

 

do you want to open new trade at every signal? This is quite dangerous, you might end up with new trades opened on every bar or even every tick,if you don’t do it right.

 

But it is possible, you only need to make MagicNumber parameter dynamic.

Define a variable and name it for example MyMagicNumber, and  increment it before every order.

 

Then use this variable for Magic Number in your order and it will open new order with new magic number

マーク
StrategyQuantアーキテクト

0

ピット

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

プロフィールを表示

12年前 #124915

こんにちは
マーク, you can upload one 例.

Thank ピット

0

チョールトン

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

プロフィールを表示

12年前 #124918

Hello Chorlton,
 
do you want to open new trade at every signal? This is quite dangerous, you might end up with new trades opened on every bar or even every tick,if you don’t do it right.
 
But it is possible, you only need to make MagicNumber parameter dynamic.
Define a variable and name it for example MyMagicNumber, and  increment it before every order.
 
Then use this variable for Magic Number in your order and it will open new order with new magic number

マークさん、こんにちは,

Appreciate the reply.

My trigger signal would occur reasonably frequently and I would like to be able to control the maximum number of trades taken within a specific period (eg. No more than 3 on one currency pair within one 8hr trading session) but I guess that’s another question.

Going back to your comment I didn’t think this would be possible unless the EA tracks all previous trades entered . Surely this would get very complicated??? What happens if it is stopped and then restarted etc??

0

マーク・フリック

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

プロフィールを表示

12年前 #124920

こんにちは,

 

yes, it will be little bit complicated, for order management that is this complex you would do better if you’ll learn MQL programming.

マーク
StrategyQuantアーキテクト

0

チョールトン

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

プロフィールを表示

12年前 #124921

マークさん、こんにちは,

Quick question. Does a magic number have to be supplied when trading with an EA? For example could I just open new trades with an EA without using Magic numbers to reference them and then choose to close them manually at a later date through my MT4 terminal?

0

マーク・フリック

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

プロフィールを表示

12年前 #124925

yes, if you plan to close the trades manually then you don’t need to use magic number (or use always the same one).

 

in EA Wizard you have to use unique magic numbers because they are used to track the trades and manage SL/PT?Trailign stop, etc.

マーク
StrategyQuantアーキテクト

0

チョールトン

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

プロフィールを表示

12年前 #124936

yes, if you plan to close the trades manually then you don’t need to use magic number (or use always the same one).

 

in EA Wizard you have to use unique magic numbers because they are used to track the trades and manage SL/PT?Trailign stop, etc.

 

マークさん、こんにちは,

 

Firstly, thanks for helping me get my head around this. I purchased your software yesterday and intend to get into that once I get to grips with this.

 

Regarding magic numbers the thing that really confuses me is this:-

 

We need a magic number in order to identify the trade so that we can then manage stops which I totally understand. My understanding also is that the EA will assign the same magic number (which we have given it) each time we enter a new trade. But surely this is only sensible if the first trade entered is closed before the next trade is entered? Otherwise we can have 2 or more open trades all with the same magic number making this impossible to identify each of the open trades. If this happens how then do we manage the stops for each individual trade entered???

 

 

So in essence my question is how do traders manage multiple open trades (all with individual stop levels) on the same currency pair at the same time using an EA?? 

 

 

Below is the kind of strategy that I want to implement.:

 

For the currency pairs which I choose to trade, each time my signal trigger occurs I need to perform the following:

1) Create a market order to enter a trade (either long or short)

2) At the same time as the market order also create a stop order, say x number of pips below / above my entry price (depending on whether I am going long or short) in order to get me out of the trade at a defined loss should it immediately turn against me.

3) Should the price move in my favour then my stop order will get modified and moved to break-even.

Should another signal trigger occur on the same or different currency pair, repeat steps 1-3. [basically: enter trade -> enter Stop level -> move stop to breakeven -> move onto next trade )

All exits will be executed manually via my MT4 terminal.

 

 

Any help appreciated,

 

チョールトン

0

マーク・フリック

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

プロフィールを表示

12年前 #124938

こんにちは,

 

you are right, trades should be opened with unique magic numbers.

The EA will not open new trade with the same magic number if active order already exists.

 

If you want to open multiple orders at the same time the best approach is to use multiple rules and use different magic number for each order.

 

You can see the samples, some of them open two stop orders at the same time with different magic number.

You can also check the Martingale sample here on the forum, I think it also opens multiple orders at the same time.

マーク
StrategyQuantアーキテクト

0

チョールトン

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

プロフィールを表示

12年前 #124941

こんにちは,

 

you are right, trades should be opened with unique magic numbers.

The EA will not open new trade with the same magic number if active order already exists.

 

If you want to open multiple orders at the same time the best approach is to use multiple rules and use different magic number for each order.

 

You can see the samples, some of them open two stop orders at the same time with different magic number.

You can also check the Martingale sample here on the forum, I think it also opens multiple orders at the same time.

 

Thanks Mark…. appreciate the reply.

 

One point that I need to clarify though as it may change the answer is that I’m not looking to open multiple positions at the same time. Instead, if I open one position (and then after a period of time it has then moved into profit) and then the same trigger signal appears again I want to enter a new trade whilst keeping the previous one still open. I may decide to do this many times on one currency pair so I now have multiple trades all entered at different times. This is a bit like pyramiding into a trade. eg. open one trade >- trade moves into profit >- open extra trade….repeat if required.

 

I would have thought this is something that many traders do so I’m surprised that this seems so hard to achieve. Maybe I am misunderstanding something but based on current understanding in order for the EA to allow me to enter the next trade I would have to close the previous trade first… this seems crazy    🙁

0

マーク・フリック

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

プロフィールを表示

12年前 #124979

ok, it doesn’t matter that you are not trying to open the new positions at the same time, you want to open new position while position to the same direction already exists.

 

To do this you have to use unique magic number, otherwise you wouldn’t be able to control the trade.

If you want to open just 2-3 positions like this then it is relatively simple, just add a rule (tab) for each new position to EA Wizard.

If you want to open more of them it can get more complicated and the strategy starts to be difficult to understand an dmanage.

マーク
StrategyQuantアーキテクト

0

george kyriakides

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

プロフィールを表示

10年前 #137953

Hello Chorlton,

 

do you want to open new trade at every signal? This is quite dangerous, you might end up with new trades opened on every bar or even every tick,if you don’t do it right.

 

But it is possible, you only need to make MagicNumber parameter dynamic.

Define a variable and name it for example MyMagicNumber, and  increment it before every order.

 

Then use this variable for Magic Number in your order and it will open new order with new magic number

 

Hi there Administrator.

 

please can you help me make magic number parameter dynamic. it doesn’t mater how many trades i open at all on my system i am busy with. as i will be using the close all function should total profits of all trades be an x amount.

some assistance would be greatly appreciated.

 

defining a varable i have no problem doing but were do i increment it before every order?

 

some help with an example will do wonders thanks

 

kind regards

George k

0

Tomas Matejka

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

プロフィールを表示

10年前 #137964

george kyriakides

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

プロフィールを表示

10年前 #138003

Thank you so much. much appreciated 😀

 

hope you have a great weekend

 

regards

0

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