[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 70

 

Newbie question:

Is it possible to redo the stochastic so that it appears as indicator_chart_window - but uses my levels (instead of 0 and 100 - other parameters will be set)

 
Easy. But what will you see on the chart if the price is 1.3077 and the stochastic is 56, for example? The range of the chart will be shown by the spread of the price.
 
granit77 >> :
Easy. But what will you see on the chart if the price is 1.3077 and the stochastic is 56, for example? The range of the chart will be shown by the spread of the price.

But how?

 
Skydiver >> :

So you have 3 pending orders and if at least 1 is triggered then some condition is set?

If yes, then you can do it like this

for(int cnt=0;cnt<OrdersTotal();cnt++) // последовательно проверяем все ордера

{

OrderSelect(cnt, SELECT_BY_POS)
if(OrderOpenTime()!=0) ///время не равно 0 значит отложка сработала(или как писал Roger if(OrderType()<2) )
{
///необходимая операция
}
}

or do you have 1 open order + 3 pending orders?

Then you may try it like this

//в глобальных переменных

int tick[3];

//в функции sta

......................

Thanks for the idea I will try it!!!

 
-Lord- >> :

But how ??

//заменяем в индикаторе строку
#property  indicator_separate_window
//на строку
#property  indicator_chart_window

And we can't see anything. The indicator should now be drawn on the price chart, but the values of the price and the oscillator are very different, so we can see the price, but the indicator line is outside the visible area. For example, the price chart window is scaled from 1.3075 to 1.3125, the price is 1.3110, stochastic value is 73.28, which is clearly outside the chart area. Naturally, the stochastic line will not be visible.

 
Can you please tell me the following darn thing, the number obtained for example double is 1539171755567481400000000.00000000, how to round it up to 15392 and that it becomes int then?
 
Inzer >> :

If this is the whole code, it doesn't even compile. If you put a number in place of Lot, the EA works fine.


It's not all there, I didn't touch the declared variables in the beginning, it's all there

 
Roger >> :

Look at what it says in the logbook. Maybe you don't have enough money in your account.

I have money, the server is connected, I did not notice anything scary or new in the logbook, I'm freaking out myself, everything seems to be correct

 
granit77 >> :

And we don't see anything. The indicator should now be drawn on the price chart, but the values of the price and the oscillator are very different, so we see the price, but the indicator line is outside the visible area. For example, the price chart window is scaled from 1.3075 to 1.3125, the price is 1.3110, stochastic value is 73.28, which is clearly outside the chart area. Naturally, the stochastic line will not be visible.


that's understandable - I'm not arguing.

but ...... stochastic uses some kind of channel from 0-100 - so if it is redirected to my channel and makes the top is 0 and the bottom is 100 - then respectively the stochastic itself will not be drawn in the visible zone and inside the channel on the chart

 

It is possible in principle, although it does require some knowledge. It is not very clear in the way you stated, what this would achieve, what "my channel" you mean, etc.

It is possible to generalise by finding out the price swing on the chart via WindowPriceMax, WindowPriceMin and scaling the stochastic accordingly.

But most importantly, what is the benefit of this, apart from the programming exercises?

Reason: