[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 275

 
Dimka-novitsek:
There's a lot of code, I'm sorry, but there must be a basic reason!

This is roughly the algorithm for finding errors:

1. Make sure that all objects are created with unique names, especially when recalculating the indicator on the new bar

2. Look at the list of objects created in the chart, and check their properties - whether time and price are specified correctly: often the coordinates do not contain the necessary information.

3. ??? enough for now, if the first two points do not help, then we'll think further))

 

Hello! Can you tell me how to remember the right price?

For example the price of the intersection of two Ma?

if( Ma1>Ma2) 
 
alsu:

This is roughly the algorithm for finding errors:

1. Make sure that all objects are created with unique names, especially when recalculating the indicator on the new bar

2. Look at the list of created objects on the chart, and check their properties to see if time and price are correct everywhere: often the coordinates do not include the correct one.

3. ??? enough for now, if the first two points did not help, we will think further))


Thank you!
 
The main thing is that he's drawing lines. All right, let him write objects for now.
 

I am writing an owl with data analysis from other instruments in iMA. Will such a construction (function read iMA value) work correctly in a strategy tester, according to the above algorithm? The tester is not multicurrency. I put the owl for testing on EURUSD, all trades - also ONLY on this pair, taking into account iMA values of other symbols).

Here is the code section (function for calculation of aggregate iMA values from different currency pairs):

double EUR(int Mode, int Price, int i, int per1, int per2){
   return(
            (iMA("EURUSD",0,per2,0,Mode,Price,i)-
            iMA("EURUSD",0,per1,0,Mode,Price,i))*10000*kUSD
            +
            (iMA("EURGBP",0,per2,0,Mode,Price,i)-
            iMA("EURGBP",0,per1,0,Mode,Price,i))*10000*kGBP
            +
            (iMA("EURCHF",0,per2,0,Mode,Price,i)-
            iMA("EURCHF",0,per1,0,Mode,Price,i))*10000*kCHF
            +
            (iMA("EURJPY",0,per2,0,Mode,Price,i)-
            iMA("EURJPY",0,per1,0,Mode,Price,i))*100*kJPY
          ); 
   
}   
 

The tester is not multi-currency in terms of trading, you can take data from any TF and symbol, as long as it is there.

Tip: specify explicitly the timeframe too, check the opening time of someone else's candle, for peeking.

 

Good afternoon All.

Can you please tell me how to pull the colour of the indicator Heiken Ashi of the current or a given candle.

I tried to take it through the indicator buffers, but the values in all four buffers are static and only in 0 there is a change when the colour changes and that by 0.0001 value.

Thanks in advance.

 
FAQ:

The tester is not multi-currency in terms of trading, you can take data from any TF and symbol, as long as it is there.

Tip: specify explicitly the timeframe too, check the opening time of someone else's candle, for peeking.

Thanks.
 
ABrej:

Good afternoon All.

Can you please tell me how to pull the colour of the indicator Heiken Ashi of the current or a given candle.

I tried to take it through the indicator buffers, but the values in all four buffers are static and only in 0 there is a change when the colour changes and that by 0.0001 value.

Thanks in advance.


Scan the moment the buffers change below/above each other. This is what sets the colour
 
So you have to check every tick? That was the idea before, I'll be around. FAQ Thank you.
Reason: