ヒーッ!ヒーッ!ヒーッ!ヒーッ!ヒーッ!ヒーッ!ヒーッ!ヒーッ!」。 - ページ 2

 
これって大丈夫なんでしょうか?
extern int LotPercentage=10; // use 10% of balance as lot size


double LotInBalance=(LotPercentage/100)*AccountBalance(); // find the amount that is 10% of balance lets assume balance is $1000
double Lot=LotInBalance/(MarketInfo(Symbol(), MODE_MARGINREQUIRED)) // divide as you said
 
onewithzachy:
あなたの口座の通貨で戻ってきます。https://www.mql5.com/en/forum/140034 ここに添付ファイルをあげました。

添付ファイルはインジケータです。私はインジケータについて何も知らないので、どこから始めればいいのかわかりませんでした。
 
jameslarry:

添付ファイルはインジケーターなんだけど、インジケーターのことは何も知らなくて、EAを勉強し始めたばかりだから、何から始めたらいいのかわからなくて。

さて、その方法ですが。

MetaTraderをインストールしたフォルダ(C: \Program Files...) > expertフォルダ > indicatorフォルダを開き、添付ファイルを移動またはコピーしてください。

 
onewithzachy:

さて、その方法ですが。

MetaTraderをインストールしたフォルダ(C: \Program Files...) > expertフォルダ > indicatorフォルダを開き、添付ファイルを移動またはコピーしてください。


metaeditorでファイルを開く方法は知っています。下記のコードで0.1が返ってくるのでしょうか?また、未検証の危険なコードは、残高を5000ドルに設定しても、最小ロットを買う余裕がないというエラーが出ます。
extern int LotPercentage=10; // use 10% of balance as lot size


double LotInBalance=(LotPercentage/100)*AccountBalance(); // find the amount that is 10% of balance lets assume balance is $1000
double Lot=LotInBalance/(MarketInfo(Symbol(), MODE_MARGINREQUIRED)) // divide as you said
 
jameslarry:

はい、メタエディターでファイルを開く方法は知っています。下のコードは0.1を返すようになりますか?

MarketInfo(Symbol(), MODE_MARGINREQUIRED)の値が分からないので、レバレッジと取引したい通貨の現在 価格に依存します。

私は別のタイムゾーンに住んでいる、ジェームズに行かなければならない。

:D

 
レバレッジは1:100で、異なるレバレッジで動作するようにしたい。
 
jameslarry:
レバレッジは1:100で、異なるレバレッジで動作するようにしたい。
1ロットのEURUSDのコストは今 - 私は思う - 約$ 1268.78です。より安全であるために、たくさんの計算があります。
 
onewithzachy:
1ロットのEURUSDのコストは今 - 私は思う - 約$ 1268.78です。より安全であることが十分な計算があります。

それでもエラーになる。私はただバランスからロットを取得したいだけで、安全かどうかは関係ありません。ロットの値をチャートに出力して、何を返しているのか知る方法はありますか?

extern int LotPercentage=10; // use 10% of balance as lot size


double LotInBalance=(LotPercentage/100)*AccountBalance(); // find the amount that is 10% of balance lets assume its $1000
double LotUnits=LotBalance*AccountLeverage(); // multiply this 10% balance($100) by leverage to get lot units
double lots=NormalizeDouble((LotUnits/100000),2); // expected to return 0.1
/* divide this lot units by 100,000(standard lot size units) and normalize to 2 decimal places to get something like 0.1 if account balance is say $1000 for use in ordersend()*/

 

jameslarry:
Hi i would like to calculate lots such that if say account balance is $1000 to open trades with $100 in other words 10% and when the balance grows to $2000 to open trades with $200. This is some sort of incremental system that should maintain lot size of new trades at 10% of balance. How do i go about it its nowhere in mql4 book.

100ドルがあなたのリスクですか? それとも100ドルの証拠金を使いたいのですか?

 
jameslarry:

まだエラーが出ます。私はただバランスからロットを取得したいだけなのですが、それが安全かどうかは関係なく、AccountBalanceはstrategy testerでは動作しないと思います。ロットの値をチャートに出力して、何を返しているかを知る方法はありますか?

OrderSend() を見せてください。