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

 

Good evening, all. Can you tell me please, there are two custom indicators. One of them draws different coloured dots in the orders (buy or sell), the other one draws different coloured arrows (also buy or sell). Now, how to place a condition to open an order if a point or an arrow is drawn on the bar? The indicator lines are 0 and 1. I have assigned Line1 and Line2 to the iCustom function, but I don't know how to use them in a condition, help me!




 

Would it be adequate to test the EA on opening prices in this implementation of the start function ?

int start() 
{
         
  if(Time[0] > prev_time ) //опрашиваем индикатор только один раз по открытию бара 
  {
    Trade();
  
    prev_time = Time[0];
  } 
  
  return (0);
}

But at the same time each position has its own stop loss and take profit.
Or if there is a stop and take, should we test on all ticks?

 
Scomoroh:

Good evening, all. Can you tell me please, there are two custom indicators. One of them draws different coloured dots in the orders (buy or sell), the other one draws different coloured arrows (also buy or sell). Now, how to place a condition to open an order if a point or an arrow is drawn on the bar? The indicator lines are 0 and 1. I assign Line1 and Line2 to the iCustom function, but I don't know how to use them in a condition, help me!

1) On a blank chart, open "data window" (Ctrl + D) ;

2) Attach one indicator;

3) Check what values are returned by each of the buffers of attached indicator (when it gives a signal and when it doesn't) :

a. Move the mouse on the chart, on the bar where the signal is (look at the right value in the "function icon" line in the "data window" - there are the values of the indicator buffers);

b. Move the mouse on the chart, on the bar where there is no signal (look at the right value in the line "function icon" in the "data window" - there are values of indicator buffers).

4) Condition for opening - if the indicator buffer value on the 1st bar is equal to what you found in point 3 (separately for each buffer);

5) Similarly for the second indicator.

 
sv.:

Would it be adequate to test the EA on opening prices in this implementation of the start function ?

But at the same time each position has its own stop loss and take profit.
Or if there is a stop and take, should we test on all ticks?


Stops are executed on ticks, the server will not wait for the next bar to open if the stop condition is met on the incoming tick. With control of a new bar we can only make trading decisions or use virtual stops (but then the slippage may be even worse than if the brokerage house cheats).
 
Please advise which terminal is suitable for Windous Phone 8 and the best way to download it.
 
Thank you, ALXIMIKS !!!! I will give it a try!
 
Interesting:
Please advise which terminal is suitable for Windous Phone 8 and the best way to download it.

I have no such terminals. They will announce it on the forum and you won't want to miss it ))))
 

Can you people tell me how it could be...?

is it the SL not working or is it the so called slippage???

 
clubsmi:

Can you people tell me how it could be...?

the SL did not work or it's a so called slippage?


This is a nonsense, it's called slippage, one of many hundreds... of difficulties, a very good thing for dts...

it may be 10 or 50 or more pips (4 digits) depending on the instrument and depending on how hard the price flew and depending on how greedy the dealers are

 
clubsmi:

Can you people tell me how it could be...?

The SL has not worked or is it a so called slippage???


It's not slippage, it's an increased spread on the news or just a sharp movement. Or may be due to very unfair behaviour of brokerage companies ))))


Although there may be a combination of slippage of 5 pips + increased spread of 4 pips.

Reason: