[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 433

 
skyjet:

Good afternoon!

Please help with indicator MA=iMA(NULL,0,TrendPeriod,0,MODE_EMA,PRICE_CLOSE,0);

How can I give applied_price multiple values, and select the right one when needed?

Your question is not clear. Can you be more specific about what you want to achieve?
 
nadya:
Your question is not clear. Can you be more specific about what you want to achieve?
My question is: can a variable have two values? If so, how do I choose the right one?
 
Opium:

Is it possible to add 0.01 lot to the mt4 platform on the demo account?

You can. You have to contact your broker to change the conditions on the demo account that you have opened. My broker has changed trade conditions upon my request and in several cases: minimum lot, number of pending and set orders. However, this request may be justified with serious intentions. Or it is easier to open a demo account with another broker.
 
skyjet:
My question is: can a variable have two values? If so, how do I choose the right one?
One variable cannot have two values unambiguously. But your problem, I think, can be solved in another way. Why not request the indicator value with the parameter you need now?
 
nadya:
One variable cannot uniquely have 2 values. But your problem, I think, can be solved in some other way. Why not request the indicator value with the parameter you need now?
You seem to have understood me. But how do you write it? If you don't mind, show me an example :)
 
skyjet:
You seem to get my point. But how to write it? If you don't mind, show me an example :)
I don't mind, but I don't know what to show you. You'd better show us your code and we'll look at it and correct it.
 
skyjet:
I think you know what I mean. But how to write it? If it's not too much trouble for you, show me an example :)


I understand that you want to use enumeration to optimize, for example, start 0 step 1 stop 5...?

In this case, the cards are at your fingertips.

Константа Значение Описание 
PRICE_CLOSE 0 Цена закрытия 
PRICE_OPEN 1 Цена открытия 
PRICE_HIGH 2 Максимальная цена 
PRICE_LOW 3 Минимальная цена 
PRICE_MEDIAN 4 Средняя цена, (high+low)/2 
PRICE_TYPICAL 5 Типичная цена, (high+low+close)/3 
PRICE_WEIGHTED 6 Взвешенная цена закрытия, (high+low+close+close)/4 

Hit it this way - for example, here's a piece of code

extern int applied_price = 0;      

int start()    // -----------------------СТАРТ ЭКСПЕРТА--------------- 
{  
  MA=iMA(NULL,0,TrendPeriod,0,MODE_EMA,pplied_price
,0);
Then you can opt in.
 
Roman.:


I understand that you want to use the enumeration to optimise, e.g. start 0 step 1 stop 5...?

In this case, the cards are at your fingertips.

Hit it this way - for example, here is a code section

Then you can opt for it.

Thank you for shedding light on this issue.
 
skyjet:
My question is: Can a variable have two values? If so, how do I choose the right one?

It cannot have two values at once. As a result of optimisation - it can have the best one, appropriate to a given historical sample of instrument quotes, which you can use for further analysis of your cob trade. Have you figured it out now?
 
skyjet:
Thank you for shedding light on this issue.

You're welcome... :-)