Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 106

 
Sepulca:

Of course you can remove it, it's just to test it and not to create a lot of open orders. This is just a training example of an EA. It opens no more than one SELL order per day. And in your EA, you should decide yourself how to close orders: by stop loss, take profit or other conditions. The time 22:55 is chosen because many brokerage companies significantly increase spread, especially on Fridays after 11:00 PM. You may think that we should open more than one order per day. And this is an example for an order placed to one side. We should look for the minimum by analogy. This code as an example, I hope it will facilitate the creation of my own EA)
Thank you very much!
 
I am trying to solve the following problem: if the body of a bullish candle is five times less than the upper shadow of this bullish candle and the lower shadow of this bullish candle is absent (equal to the opening price of the candle), then.....
   double STelo = MathAbs(Close[1]-Open[1])/Point; // тело бычьей свечи
   double SHighTen = (High[1]-Close[1])/Point; // верхняя тень бычьей свечи
   double SLowTen = (Open[1]==Low[1]);    // отсутствие нижней тени бычьей свечи
  
   if (Open[1]<Close[1] && SHighTen > 5*STelo && SLowTen >= Open[1])

Wrote this code, but something is wrong! Help, smart people!

Can anyone suggest a source for describing candlestick patterns, namely the program code in MQL4?

 
alexey1979621:
I am trying to solve the following problem: if the body of a bullish candle is five times less than the upper shadow of this bullish candle and the lower shadow of this bullish candle is absent (equal to the opening price of the candle), then.....

Wrote this code, but something is wrong! Help, clever people!

Can anyone suggest a source for describing candlestick patterns, namely the program code in MQL4?

First check the condition - whether the candle is a bullish candle, then check and count the following conditions. And. probably:

bool  SLowTen = (Open[1]==Low[1]);

and then the condition

SLowTen >= Open[1]

It needs to be rewritten.

 
Sepulca:

1. external double StopLoss=100.0;// added stop loss variable

2-3. int ticket=OrderSend(Symbol, TypeOfOrder,LotsOfOrder, OpenPriceOfOrder, Slippage, OpenPriceOfOrder+/-StopLoss, OpenPriceOfOrder-/+TakeProfit, "Your comment on the order",YourMagicNumber, 0, CLR_NONE) ;

4. READ!


Ok thanks :)
 
grocery
TarasBY:
First check the condition - whether the candle is bullish, then check and read the following conditions. And:

and then the condition

needs to be rewritten.

Thank you very much. Correct code

double STelo = MathAbs(Close[1]-Open[1])/Point; // тело бычьей свечи
   double SHighTen = (High[1]-Close[1])/Point; // верхняя тень бычьей свечи
   bool SLowTen = (Open[1]==Low[1]);    // отсутствие нижней тени бычьей свечи
 
    if (Open[1]<Close[1] && SHighTen > 5*STelo && SLowTen == true)
 
alexey1979621:
thunder

Thank you very much. Correct code



It may be correct, but it's ugly. If you're inexperienced, watch how others write... Learn to write beautifully and clearly. I'm learning all the time myself, and I advise you... Your writing is awful...
 
alexey1979621:
thunder

Thank you very much. Correct code



bool SLowTen = (Open[1]==Low[1]); // no lower shadow of a bullish candle

Search the forum for the correct way to compare real numbers.

 

Hi All, I have a question!

Tell me in THEORY Martingale system which would be profitable on account of infinite money I know, but I need it with a limited balance

OR HOW SHOULD I SAY PERFECT MARTIN SYSTEM OR WHAT IS MISSING IN THE MARKET TO MAKE IT PERFECT

ANYONE WHO DOESN'T MIND, PLEASE TELL ME.

 
FEAR:

Hi All, I have a question!

Tell me in THEORY Martingale system which would be profitable on account of infinite money I know, but I need it with a limited balance

OR HOW SHOULD I SAY PERFECT MARTIN SYSTEM OR WHAT IS MISSING IN THE MARKET TO MAKE IT PERFECT


Except for brains))
 



hoz:

Except for the brains))
good answer