[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 376

 
Hello. Folks, help please - buried somewhere a spur on redesigning indicators. How to make indicator calculation only once per bar (at each timeframe)? I remember - there was a RETURN breaker right after the start - but I do not remember the condition.
 
There you go.
Taim0 = iTime(NULL,0,0);
       if ( Taim0 == taim_open)
        {
        return;
        } 

And put start at the end of the function

taim_open = Taim0; 
Thank you all. ;-)
 
locol91 писал(а) >>
There you go.

And put start at the end of the function

>>Thank you all. ;-)

https://www.mql5.com/ru/forum/118402

 

I have installed three new terminals of different brokers to test the Expert Advisor in real trading conditions on demo and suddenly I found out that

I goterror 130= Invalid Stops. It's a hell of a thing - everything was working on the platforms I had before.

No errors in the tester of one problematic one either, didn't test the others. I have started to analyze them and it seems all three have been prohibited to open orders

SL and TP at the same time (not 100% yet, but I think this is the issue).

- Has anyone encountered anything like this? If true, "Invalid Stops" doesn't really help...

- The platform tester has nothing to do with the broker's terms and conditions?

 

chief2000 писал(а) >>

...- The platform tester is in no way linked to the broker's terms and conditions?

What about it? The tester works and has to work according to the terms of its terminal from a particular broker.

 

Apparently "works" and "should" are out of sync :)

Today one of the "problematic" brokers confirmed that it is forbidden to open real orders with the same SL and TP,

But it was possible to do it in their tester (there are other cases with the testers of other brokers as well).

 

Good afternoon, friends.


Please advise on this situation.


My broker does not allow me to trade stock index futures... Therefore, I can not see charts of these indices in my terminal...

The question arises:

Where can I get quotes from DJIA, DAX, Nikkei, American and European bonds (e.g. 10 years), as well as the so-called "dollar index", and how can I load them into the terminal, so that the terminal can use them to plot prices, use them as data.


Advise me if you get a chance.


Thank you very much in advance.
 
Morzh09 писал(а) >>

Good afternoon, friends.

Please advise on this situation.

My broker does not allow me to trade stock index futures... Therefore, I can not see charts of these indices in my terminal...

The question arises:

Where can I get quotes from DJIA, DAX, Nikkei, American and European bonds (e.g. 10 years), as well as the so-called "dollar index", and how can I load them into the terminal, so that the terminal can use them for price charts, use them as data.

Advise if you will have the opportunity.

Thank you very much in advance.

Download them from the Alpari server. DJI, DAX, Nikkei, dollar index they have. You can do it from the Alpari demo server. Look for the address on their website. Or install their MT4 version and open a demo account. They do not have Eurobonds.

 

People, help!!! Broke my brain, but not enough knowledge. I use WindowPriceMax and WindowPriceMin functions in my indicator. The problem is that when I shift to another timeframe for the indicator's initial calculation these functions take data from the previous window (for example, the previous chart had 4H and max and min windows were for example 1.4000 and 1.2000, when I shift to D, max and min windows become 1.5000 and 1.1000, but first indicator is calculated with old values of max and min, and only with a new tick it takes new values. And you can wait a long time for a new tick, for example, at night... How to avoid this problem?

//***************************************
int init() {
IndicatorBuffers(3);
SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0, zz);
    SetIndexBuffer(1, fxH);
    SetIndexBuffer(2, fxL);
if ( Points!=0 && Percent==0) di=10* Points*Point;
return(0); }
//-----------------------------------------------
int deinit(){ ObjectsDeleteAll(0,21); return(0);}
//********************************************************
int start() {
int i, n, cb0;
int counted_bars=IndicatorCounted();
if ( counted_bars<0) {Print("Indicator Error (Counted bars < 0)!" ); return(-1); }
if (Bars<100) {Print("Indicator Error (Bars < 100)!" ); return(-1); }
int cbi=Bars-2;
if ( counted_bars>2) { cbi=Bars- counted_bars; }
//======================================================================================================================
for ( i= cbi; i>=0; i--) {
//-----------------Functions------------------------------
fxH[ i]=High[ i];  
fxL[ i]=Low[ i];
Max=(WindowPriceMax()-WindowPriceMin())/100;
 
kon12 >>:

Люди, помогите!!! Мозги сломал, но знаний не хватает. В индикаторе использую функции WindowPriceMax и WindowPriceMin. Беда в том, что при переходе на другой таймфрейм для начального расчета индикатора эти функции берут данные с предыдущего окна (например, предыдущий график был 4Н и мах и мин окна были допустим 1.4000 и 1.2000, перехожу на D, и мах и мин окна становятся 1.5000 и 1.1000, но сначала индикатор расчитывается по старым значениям мах и мин, и только с приходом нового тика считает новые значения. А нового тика можно ждать долго, например ночью... Как обойти эту заморочку?

I can suggest this trick to check:

see if the WindowFirstVisibleBar() and WindowBrsPerChart() functions work correctly in your situation. If their returned values correspond to the new chart, you can use ArrayMaximum() and ArrayMinimum() to calculate the maximum and minimum price values on the chart