코딩하는 방법? - 페이지 195

 
kipper:
무슨 일이 일어나고 있는지 프로그램은 수치가 15세 미만일 때 모든 것을 예상하고 파란색으로 유지됩니다. 제가 무엇을 잘못했는지 확실하지 않습니다. 누군가가 저를 위해 약간의 빛을 비춰줄 수 있기를 바랍니다.

다음은 4가지 색상이 있는 코드입니다.

이 시도:

if(sym_1 85) color_1 = Red; else color_1 = Blue;

if(sym_2 85) color_2 = Red; else color_2 = Blue;

if(sym_3 85) color_3 = Red; else color_3 = Blue;

if(sym_4 85) color_4 = Red; else color_4 = Blue;
 

"bar"는 현재 막대에서 이동합니다.

0 - 현재(열린) 막대의 경우

1 - 이전("닫힌") 막대.

grstaka:
감사합니다!!!! 막대는 무엇을 의미합니까? +1 -1 바인가요?
 

도움을 주셔서 감사합니다. Roger, 감사합니다.

 

ob/os 표시기 생성 도움말

2 쌍의 가격 차이를 취하고 결과를 표시하는 과매수/과매도 표시기를 만드는 데 도움을 줄 코딩 기술을 가진 사람을 찾고 있습니다. 꽤 간단해야하지만 나는 프로그래머가 아니므로 정확히 확신하지 못합니다. 나를 위해 이것을 시도하는 데 관심이 있는 사람이 있습니까? 그렇다면 저에게 알려주거나 누군가가 이미 알고 있다면 그것도 좋습니다. 나는 검색했지만 이것을 할 수있는 것을 보지 못했습니다.

 

마진 콜까지 핍스

누구든지 포지션에서 마진 을 받을 때까지 오더가 갈 수 있는 핍 수를 알아내는 방법을 알고 있습니까? 한 번에 하나의 포지션만 열려 있다고 가정합니다.

분명 방법이 있을 것 같은데 방법을 못찾았네요.

 

거래에 맞춰진 경고 신호 - 어떻게 합니까?

안녕,

거래 화살표를 표시하는 표시기가 있습니다. 파란색은 매수, 분홍색은 매도입니다. 나는 소리 신호와 함께 실제 매수 주문 및 매도 주문 이 필요합니다. 따라서 한 쌍에 대해 항상 1번의 거래만 있고 반대 화살표가 있을 때 현재 거래가 닫히고 화살표에 따라 새로운 거래가 발생합니다. 코드를 수정하는 위치 및 방법. 여기에 코드를 첨부합니다. 당신의 도움을 주셔서 감사합니다.

/*

+------------------------------------------------------------------+

| |

+------------------------------------------------------------------+

*/

#property copyright "Copyright)"

#property link "http://"

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 DodgerBlue

#property indicator_width1 3

#property indicator_color2 Magenta

#property indicator_width2 3

extern string note1 = "First Moving Average";

extern int MA1 = 10;

extern string note2 = "0=sma, 1=ema, 2=smma, 3=lwma";

extern int MA1Mode = 0; //0=sma, 1=ema, 2=smma, 3=lwma

extern string note3 = "--------------------------------------------";

extern string note4 = "Second Moving Average";

extern int MA2 = 50;

extern string note5 = "0=sma, 1=ema, 2=smma, 3=lwma";

extern int MA2Mode = 0; //0=sma, 1=ema, 2=smma, 3=lwma

extern string note6 = "--------------------------------------------";

extern string note7 = "Arrow Type";

extern string note8 = "0=Thick, 1=Thin, 2=Hollow, 3=Round";

extern string note9 = "4=Fractal, 5=Diagonal Thin";

extern string note10 = "6=Diagonal Thick, 7=Diagonal Hollow";

extern string note11 = "8=Thumb, 9=Finger";

extern int ArrowType=2;

extern string note12 = "--------------------------------------------";

extern string note13 = "turn on Alert = true; turn off = false";

extern bool AlertOn = true;

extern string note14 = "--------------------------------------------";

extern string note15 = "send Email Alert = true; turn off = false";

extern bool SendAnEmail=false;

double CrossUp[];

double CrossDown[];

string AlertPrefix, MA1short_name, MA2short_name;

string GetTimeFrameStr() {

switch(Period())

{

case 1 : string TimeFrameStr="M1"; break;

case 5 : TimeFrameStr="M5"; break;

case 15 : TimeFrameStr="M15"; break;

case 30 : TimeFrameStr="M30"; break;

case 60 : TimeFrameStr="H1"; break;

case 240 : TimeFrameStr="H4"; break;

case 1440 : TimeFrameStr="D1"; break;

case 10080 : TimeFrameStr="W1"; break;

case 43200 : TimeFrameStr="MN1"; break;

default : TimeFrameStr=Period();

}

return (TimeFrameStr);

}

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

if (ArrowType == 0) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 233);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 234);

}

else if (ArrowType == 1) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 225);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 226);

}

else if (ArrowType == 2) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 241);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 242);

}

else if (ArrowType == 3) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 221);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 222);

}

else if (ArrowType == 4) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 217);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 218);

}

else if (ArrowType == 5) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 228);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 230);

}

else if (ArrowType == 6) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 236);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 238);

}

else if (ArrowType == 7) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 246);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 248);

}

else if (ArrowType == 8) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 67);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 68);

}

else if (ArrowType == 9) {

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0, 71);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1, 72);

}

SetIndexBuffer(0, CrossUp);

SetIndexBuffer(1, CrossDown);

//---- indicator short name

switch(MA1Mode)

{

case 1 : MA1short_name="EMA"; break;

case 2 : MA1short_name="SMMA"; break;

case 3 : MA1short_name="LWMA"; break;

default :

MA1Mode=0;

MA1short_name="SMA";

}

switch(MA2Mode)

{

case 1 : MA2short_name="EMA"; break;

case 2 : MA2short_name="SMMA"; break;

case 3 : MA2short_name="LWMA"; break;

default :

MA2Mode=0;

MA2short_name="SMA";

}

AlertPrefix=Symbol()+" ("+GetTimeFrameStr()+"): ";

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

bool NewBar()

{

static datetime lastbar;

datetime curbar = Time[0];

if(lastbar!=curbar)

{

lastbar=curbar;

return (true);

}

else

{

return(false);

}

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start() {

int limit, i, counter;

double MA1now, MA2now, MA1previous, MA2previous, MA1after, MA2after;

double Range, AvgRange;

int counted_bars=IndicatorCounted();

//---- check for possible errors

if(counted_bars<0) return(-1);

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

for(i = 0; i <= limit; i++) {

counter=i;

Range=0;

AvgRange=0;

for (counter=i ;counter<=i+9;counter++)

{

AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);

}

Range=AvgRange/10;

MA1now = iMA(NULL, 0, MA1, 0, MA1Mode, PRICE_CLOSE, i);

MA1previous = iMA(NULL, 0, MA1, 0, MA1Mode, PRICE_CLOSE, i+1);

MA1after = iMA(NULL, 0, MA1, 0, MA1Mode, PRICE_CLOSE, i-1);

MA2now = iMA(NULL, 0, MA2, 0, MA2Mode, PRICE_CLOSE, i);

MA2previous = iMA(NULL, 0, MA2, 0, MA2Mode, PRICE_CLOSE, i+1);

MA2after = iMA(NULL, 0, MA2, 0, MA2Mode, PRICE_CLOSE, i-1);

if ((MA1now > MA2now) && (MA1previous MA2after)) {

CrossUp = Low - Range*1.5;

if ( NewBar())

{

if (AlertOn) {

Alert(AlertPrefix+MA1short_name+" ("+MA1+") "+"crosses UP " + MA2short_name+" ("+MA2+")");

}

if (SendAnEmail) {

SendMail(AlertPrefix,MA1short_name+" ("+MA1+") "+"crosses UP " + MA2short_name+" ("+MA2+")");

}

}

}

else if ((MA1now MA2previous) && (MA1after < MA2after)) {

CrossDown = High + Range*1.5;

if (NewBar())

{

if (AlertOn) {

Alert(AlertPrefix+MA1short_name+" ("+MA1+") "+"crosses DOWN " + MA2short_name+" ("+MA2+")");

}

if (SendAnEmail) {

SendMail(AlertPrefix,MA1short_name+" ("+MA1+") "+"crosses DOWN " + MA2short_name+" ("+MA2+")");

}

}

}

}

return(0);

}

 

간단한 MA 교차 표시기처럼 보입니다. MA 크로스 EA를 구축할 수 있는 무료 튜토리얼을 보려면 내 서명의 링크를 확인하십시오 .

행운을 빕니다

럭스

 

안녕하세요 시니어 EA는 로봇을 만들 수 있습니다. 모델도 마티앵글

1.루핑 -> 로봇을 몇 바퀴 돌았는지 설정

2.First Order Auto -> 당시 소시장의 추세에 따라 매수 또는 매도를 주문하고, 마지막 매수 또는 매도 옆에 자동 op.

3.시작 로트 -> 로트 설정

4. 범위 -> 주문한 위치와 다른 위치 사이의 거리

5.Rangeincrease--> 다중 성장에 따라 다른 위치와 다른 위치 사이의 거리 개발

6. 시작 레벨 증가 -> 기능 매개변수 범위 증가를 활성화하는 디바리스 순서

7.승수 -> 다음 순서의 곱셈 로트

8.TPmoney -> 그 당시 돈의 이익에 도달하면 모든 주문을 닫습니다.

감사하다

 

도움말 EA

mirak:
안녕하세요 시니어 EA는 로봇을 만들 수 있습니다. 모델도 마티앵글

1.루핑 -> 로봇을 몇 바퀴 돌았는지 설정

2.First Order Auto -> 당시 소시장의 추세에 따라 매수 또는 매도를 주문하고, 마지막 매수 또는 매도 옆에 자동 op.

3.시작 로트 -> 로트 설정

4. 범위 -> 주문한 위치와 다른 위치 사이의 거리

5.Rangeincrease--> 다중 성장에 따라 다른 위치와 다른 위치 사이의 거리 개발

6. 시작 레벨 증가 -> 기능 매개변수 범위 증가를 활성화하는 디바리스 순서

7.승수 -> 다음 순서의 곱셈 로트

8.TPmoney -> 그 당시 돈의 이익에 도달하면 모든 주문을 닫습니다.

감사하다

Uppp plsss

 

아이타임

MTF에서 Bar의 시작 시간을 가져오는 코드는 다음과 같습니다.

GetTime =(iTime(Symbol(),60,i)); 괜찮아요

Bar의 종료 시간은 어떻게 알 수 있나요?

감사해요