costume candle close help neede - page 3

 

It's getting better! But still not good enough :)

I have to repeat:

Not you know what OrderSelect(..) returns, why, and what you can do with it? Same with OrderClose().

It's all in "Moving Average.mq4" in your expert folder!!

 
int start()
{
      bool resOS,resOC;
      resOS=OrderSelect(0,SELECT_BY_POS,MODE_BASE);
      if(OrderProfit()>0.15)
      if(OrderOpenTime()<iTime[0])
      if(OrderType()==OP_SELL)
      resOC=OrderClose(OrderTicket(),OrderLots(),Bid, 3);
return(0);
}

Hi there!

Now it works the way i want.

but there is now a new problem with it. 

 if(OrderOpenTime()<iTime[0]) that is my problem.

If there is the open trade in the current candle it close the trade at candle close if it is bigge then 15cent by 0.01 lot.

Is it smaller then 15cent it keeps the trade open. So far so good. But follow up candles closing only at 15cent why we are executing the line of  

  if(OrderOpenTime()<iTime[0]).

how do i code it not from OrderOpenTime.

I hope u understand what i mean.

Thanks a lot for helping me. 

 

" why we are executing the line of   if(OrderOpenTime()<iTime[0])."

You should know, it's your code?

 

Dont understand u question!?

i said it all above whats my goal here 

u know im fresh to this. u answers are a bit ????????

If i know i would not ask for help.

thanks again 

 
pieronetto:

Dont understand u question!?

i said it all above whats my goal here 

u know im fresh to this. u answers are a bit ????????

If i know i would not ask for help.

thanks again 


 
 u is not a word, remember that not everyone on the forum is a native English speaker. To many, your post is nonsense!
 

I'm not a native english speaker either.

 sorry about it if it is a problem on this forum site

 

Still having that problem above

Hoping for some pointers or links where I can look at it

Sure someone else discuss this before

Thanks

 
pieronetto:

Dont understand u question!?

i said it all above whats my goal here 

u know im fresh to this. u answers are a bit ????????

If i know i would not ask for help.

thanks again 

1) It is your code, you should know, why it is there and why you have placed it there.

2) Try to understand what the line does read the reference about the functions

3) Play with that line ..

4) To learn coding use the example of others, read the docs, do a workshop,  ...