任何菜鸟问题,为了不给论坛添乱。专业人士,不要路过。没有你就无处可去 - 6. - 页 625

 
laveosa:

不,这不是工作.....我们这样做是为了什么?


MaperiodM5ma_2 = 25 / Period(); 假设我们把它设置为H1,结果我们得到25/60=0.41,在int中它将是0,因为没有这样的МА周期,在这种情况下我们使用最小的可能,即1。事实上,它应该是有效的,我有时会使用这样的变体,交易的结果与 "原生 "时期差别不大。
 
Vinin:

你只需在提问前思考。接近和不接近是完全不同的概念。

问题很简单,如何使测试结果在任何时间都是一样的,如果不够清楚,我们下次会试着更详细一些......谢谢你!
 
benzovoz:


MaperiodM5ma_2 = 25 / Period(); 假设我们把它设置在H1,结果将是25/60=0.41,在int中它将是0,因为没有这样的МА周期,在这种情况下我们使用最小的可能,即1。事实上,它应该是有效的,我有时会使用这样的变体,贸易的结果与 "原生 "时期差别不大。

我明白了,非常感谢,它帮助我理解了一些事情 ...我还没有改变结果,但还是谢谢你 :)
 
laveosa:

我明白了,谢谢,这对我理解一些问题有很大的帮助......。我还没有改变结果,但还是谢谢你 :)


这对你来说是行不通的,因为我们还没有考虑到指标计算的 条数,我使用的是零条,所以对我来说是行得通的,对你来说是第一条和第二条,当切换到更高的时间框架时,你不能 "转换 "它们。

M5maBIG_1= iMA(ed, Period() , MaperiodAVTO ,0,MODE_EMA,PRICE_CLOSE,1);


 
benzovoz:


这对你来说是行不通的,因为我们还没有考虑到指标计算的条数,我使用的是零条,所以对我来说是行得通的,对你来说是第一条和第二条,当你切换到更高的时间框架时,你无法 "转换 "它们。

M5maBIG_1= iMA(ed, Period() , MaperiodAVTO ,0,MODE_EMA,PRICE_CLOSE,1);



我得到了它....我现在就去试试。

 
我有一个指标。
//+------------------------------------------------------------------+
//| T3MA_ALARM.mq4 |
//| Copyright © 2011, Martingeil |
//| fx.09@mail.ru |
//+------------------------------------------------------------------+
//исправленный Martingeil, теперь можно в тестере увидеть его стрелки.
#property copyright "Copyright © 2011, Martingeil"
#property link "fx.09@mail.ru"

//---- indicator settings
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- indicator parameters
extern int period = 4; //12
extern int shift = 0; //сдвиг по бару
//---- indicator buffers
double BufferUp[],BufferDn[];
int q,st=5;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(2);
//---- drawing settings
SetIndexStyle(0,DRAW_ARROW,2);
SetIndexArrow(0,233);
SetIndexStyle(1,DRAW_ARROW,2);
SetIndexArrow(1,234);

SetIndexBuffer(0,BufferUp);//стрелка синяя верх
SetIndexBuffer(1,BufferDn);//стрелка красная вниз
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("T3MA-ALARM ("+period+")");
//---- initialization done
if(Digits==3 || Digits==5) q=10;
st=st*q;
return(0);}

int deinit()
{
ObjectDelete("low");
ObjectDelete("high");
}
//+----------------------------------------------------------------------+
//| Moving Average of Oscillator |
//+----------------------------------------------------------------------+
int start()
{
//---- ArraySetAsSeries --------------------------------------------------
double Ma[500],MaOn[500];
double y0[500],y1[500],y2[500];
int i,limit=ArraySize(Ma);
ArraySetAsSeries(Ma,true);
//---- IndicatorCounted --------------------------------------------------
int counted_bars=IndicatorCounted();
int limit1=Bars-counted_bars;
if (limit1>1){limit1=Bars-period-1;}
//---- EMA ---------------------------------------------------------------
for(i=limit1; i>=0; i--) Ma[i] =iMA(NULL,0,period,0,MODE_EMA,PRICE_CLOSE,i);
for(i=limit1; i>=0; i--) MaOn[i]=iMAOnArray(Ma,limit,period,0,MODE_EMA,i);

for(i=limit1; i>=0; i--)
{
y0[i+shift]=MaOn[i+shift];
y1[i+1+shift]=MaOn[i+1+shift];
y2[i+2+shift]=MaOn[i+2+shift];

if(y0[i+shift]-y1[i+1+shift]<0 && y1[i+1+shift]-y2[i+2+shift]>0){BufferDn[i+1]=High[i+1]+st*Point;}//продажа
if(y0[i+shift]-y1[i+1+shift]>0 && y1[i+1+shift]-y2[i+2+shift]<0){BufferUp[i+1]=Low[i+1]-st*Point;}//покупка
//---- Signal Trend Up || Dn ---------------------------------------------
if(y0[i]-y1[i+1]>0) Comment ("\n SWAPLONG = ",MarketInfo(Symbol(),MODE_SWAPLONG),
" SWAPSHORT = ",MarketInfo(Symbol(),MODE_SWAPSHORT),"\n BUY TREND ",DoubleToStr(Close[i],Digits));

else if(y0[i]-y1[i+1]<0) Comment ("\n SWAPLONG = ",MarketInfo(Symbol(),MODE_SWAPLONG),
" SWAPSHORT = ",MarketInfo(Symbol(),MODE_SWAPSHORT),"\n SELL TREND ",DoubleToStr(Close[i],Digits));
}


//---- done
return(0);}
//+---------------------------------------------------------------------+




我想做一个EA,当箭头出现时,就进入一个位置,在EA中应该写什么条件?

这里是EA本身。

//+------------------------------------------------------------------+
//| million.mq4 |
//| Словаков Максим |
//| www.rubrf.ru |
//+------------------------------------------------------------------+
#property copyright "Словаков Максим"
#property link "www.rubrf.ru"
#property version "1.00"
#property strict

extern int Risk = 1;//риск на зделку
extern int Magic = 123; //магическое число


int x;
int y;
int v;
int z;
//+------------------------------------------------------------------+
int start()
{
double strelka=iCustom(NULL,0,"strelka",10,0,1,0);
double ma = iMA(NULL,0,72,0,MODE_SMMA,PRICE_CLOSE,0);
double atr = iATR(NULL,0,72,0);
double lotBuy = ((Risk*AccountEquity())/(1*(Ask-(Ask-atr)))/10000000);
double lotSell = ((Risk*AccountEquity())/(-1*(Bid-(Bid+atr)))/10000000);
if(OrdersTotal()==0)
{
if(ma<Bid)
{
  if(какое здесь нужно условие написать?)
{
x=OrderSend(Symbol(),OP_BUY,lotBuy,Ask,3,Ask-atr,0,"www.rubrf.ru",Magic,0,Blue);
}
}
if(ma>Bid)
{
  if( какое здесь нужно условие написать? )
{
y=OrderSend(Symbol(),OP_SELL,lotSell,Bid,3,Bid+atr,0,"www.rubrf.ru",Magic,0,Red);
}
}
}


return(0);
}
//+------------------------------------------------------------------+


 

是否可以下载技术分析的图表,--指数S&P 500期货图,TA 25图,以及S&P 500图,如果可能的话可以提示如何做,也许有解释如何下载的!

我找不到这样的经纪人,你能不能建议一个技术分析的程序,让我下载我感兴趣的指数(可以是实时的)或一个经纪人。

也许有机会下载这些指数MT-4或MT-5。我刚刚开始尝试做技术分析,我非常希望听到专家关于如何应对我的任务的建议。

我非常感谢您的帮助。
 
igalx:

是否可以下载技术分析的图表,--指数S & P 500期货图,TA 25图,以及S & P 500图,如果可能的话可以告诉你怎么做,也许有一个解释,如何下载!

我找不到这样的经纪人,你能不能建议一个技术分析的程序,让我下载我感兴趣的指数(可以是实时的)或一个经纪人。

也许有机会下载这些指数MT-4或MT-5。我刚刚开始尝试做技术分析,我希望得到专家的建议,如何应对我的问题。

在此,我对你的帮助表示感谢。



你可以,你只需要把它转换为正确的格式,甚至有经纪人有这些工具。Alpari SIP有这些东西。

 

大家好!

需要帮助,建议。

我不能向DLL传递字符串数据。或者变量类型不对,或者编码写错了。

Delphi中的DLL。

library SaveFile;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project' s (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  SysUtils,
  Classes,Dialogs;

{$R *.res}
function SaveFiles(Path: ShortString ;
Symbol: Shortstring;
Stroka: string ): integer; stdcall;

var outfile: TextFile;

begin
AssignFile(outfile, 'C:\Log.txt');

 try
   //Append(outfile);
   Rewrite(outfile);

   writeln(outfile, Stroka);
   CloseFile(outfile);
   Result:=0;
 except
   Result:=1;
 end;
   Result:=0;
 
end;

exports SaveFiles;
 
end.

不要注意路径和Simbol变量。一些不可读的废话被系统地写入文件中。

我尝试了所有的Stroka(Pchar,String,ShortString,AnsiString)变量类型,仍然是类似 "0 0 : 0 3 : 0 6 : :1 .3 "尝试切换编码--仍然无法阅读。

 

都整理好了。

一切都以UTF-8 ASCII格式书写,每个 "有用 "的字符后都会自动添加空格。而要转移超过26个字符(13个有用的)是不可能的。我将不得不传递一些变量,然后进行连接。不知何故...

原因: