[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 417
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Can you make a robot to open both ways with small stops with lots and choose a winning position? Or is it a fantasy?
OK with colour...
The question is - I want to "hide SL" from DC, i.e. not to set it with opening operator, but to assign it to variable inside expert:
extern double TrailingStop=25.0;
extern double Lots=0.1;
....
double StopB;
.....
if( entry condition) {
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0, "Buy EA",123,0,Green);
StopB=Ask-TrailingStop*Lots; //hidethe stop < - am I doing it right?
}
.....
if( profit exit conditions || Ask > StopB)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close position
return(0); // exit
}
And where do we write the SL exit condition? Together with profit closing condition using "||" or separately?
Good day! Please advise how to use iCustom function correctly, I want to create conditions for trades by the indicator colour, which is drawn in a separate histogram window:
color Oct_1=iCustom(NULL,0, "octava_1");
if ( Oct_1==Green).... etc.
When compiling the program gives an error, says "'green' - variable not defined, what's the reason?
I'd be very grateful for an answer)))
Question removed, the capital letter has a meaning))))
OK with the colour...
The question is - I want to "hide SL" from brokerage companies, i.e. I don't want to set them with opening operator, but assign them to variable inside of expert:
extern double TrailingStop=25.0;
extern double Lots=0.1;
....
double StopB;
.....
if( entry condition) {
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0, "Buy EA",123,0,Green);
StopB=Ask-TrailingStop*Lots; //hidethe stop < - am I doing it right?
}
.....
if( profit exit conditions || Ask > StopB)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close position
return(0); // exit
}
And where do we write the SL exit condition? Together with profit closing condition using "||" or separately?
I'm not a pro, but I was wondering the same thing. I personally wrote it like this (Professionals will correct me when they come)
This part picks up an open order and assigns stop and take values to variables
this part checks and closes at the take
this part checks and closes at stop
P.S.Professionals - don't mock the self-taught, maybe it could be different, but it works for me ....
I'm not a pro, but I was wondering the same thing. I personally wrote it this way (if you're a pro - correct me)
This part picks up an open order and assigns stop and take values to variables
this part checks and closes at the take
this part checks and closes at stop
P.S.Professionals - don't mock the self-taught, maybe it could be different, but it works for me ....
How do I determine the current timeframe for the EA?
If the timeframe is M1, I need to fulfil one condition, and if the timeframe is M5, I need to fulfil another condition.
How do I determine the current timeframe for the EA?
If the timeframe is M1, I need to fulfil one condition, and if the timeframe is M5, I need to fulfil another condition.
Using the Period() function
How do I determine the current timeframe for the EA?
If the timeframe is M1, I need to fulfil one condition, and if the timeframe is M5, I need to fulfil another condition.
Thank you. So period M1 corresponds to value 1, and period M5 corresponds to value 5, so it turns out that period H1 corresponds to 60, and period H4 to 240 right?
I need this construction to work: when period M1 is selected case 1 and when period M15 is selected case 15. Will it work, or is it necessary to do case 1 case 2 case 3 - in order?