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

 
sss2019:
Can you tell me how to find out the price of the trend line on each of the bars?

ObjectGetValueByShift().
 
Equilibrium:
Good day! Please help me, I can't fine tune my Expert Advisor (opening and closing of orders doesn't work by criterion like it should (by crossing stochastic every time), it opens by stochastic very rarely and I can't understand why((((), also all orders close only by stoplo or takeprofit (Ticket number error, also can't understand where the error is). thanks for any answers:


If a variable is declared globally it doesn't need to be passed to its own functions anymore, just use the Ticket and Ans variables, they will be visible in the functions.

You write in the comments that M_1 and S_1 are the first bar, and in the iStochastic() function you extract the value for them on the zero bar. If you really need data on the zero bar, then first of all, check for closing orders and then, if you are going to work with one order, exit by condition: if(Total > 0) return; and only then a condition for a new order opening. If you are planning to work on large TFs, then it would be better to replace the exit condition with the following one: if the order is opened on the current bar, nothing new is opened on the current bar yet. Otherwise, on H4, an order may open on one bar several times and trigger a stop loss on one condition.

Here is what is happening at the moment: the main bar has crossed the signal one, for example, upwards, the buy order is opened. On the next tick, the condition is saved, but you have Total more than zero and the close condition tries to trigger, and you try to use your Close_Order_S() function to close the Buy position at Ask price. Make a check on the order type and one function to close it, pass Ask or Bid into parameters, depending on the order type.

 
Comrades experts! For three (!) days I cannot solve the problem! I am a beginner in this business! I used to work in the program Market Trader, but I was recommended to switch to the program MetaTrader. vi from this moment I have problems! this program does not respond to the input of login and password! I just enter everything - and silence! it turns out that the program does not log on to the Internet. In the bottom right corner it says, there is no network! Well, that's basically the whole problem! I do not know what to do! Has anybody had such a problem??? I have WIN7/64. I have read on the Internet that it is necessary to open the 443 port! But nothing happens. the port does not open! Who can help me open the port? or it is in another problem?
 
kolospav:
Comrades experts! For three (!) days I cannot solve the problem! I am a beginner in this business! I used to work in the program Market Trader, but I was recommended to switch to the program MetaTrader. vi from this moment I have problems! this program does not respond to the input of login and password! I just enter everything - and silence! it turns out that the program does not log on to the Internet. in the bottom right corner says that there is no network! well, that's basically the whole problem! i do not know what to do! someone had such a problem??? i have WIN7/64. in internet i read that it is necessary to open the port 443! but nothing does it give. the port does not open! who will help me open the port? or it is in another problem?

What login and password do you use? Did you register a new account specifically for Metatrader?
 

Could someone please tell me

MA=iMA(NULL,0,Period_MA,0,MODE_SMA,PRICE_CLOSE,0);

how to make a mouse in the expert advisor put the indicator on the chart(line)

Do not kick me, am a newbie

 
Usual_Trader:

and what password and login do you enter? Did you register a new account specifically for Metatrader?

The new account is made for metatrader! the money is loaded from Market trader! on the website in the account statement - the money is there. I do not understand at all. Technical support is also in a stupor... I am trying to understand it myself!
 
gheka:

Please advise someone

MA = iMA(NULL,0,Period_MA,0,MODE_SMA,PRICE_CLOSE,0);

how to make an EA set an indicator (line) on a chart

Do not kick me, I am a newbie


I do not need to manually put the MA on the chart

there are a lot of indicators

help the good people

I have no explanations in documentation and a textbook.

 

Can you tell me how to write these lines?

    Line_1[i]=  iMA(NULL,0,PER,0,MODE_SMA,PRICE_CLOSE,i); 
       
    Line_2[i]=  iHigh(Line_1,0,iHighest(Line_1,0,MODE_HIGH,PER,i));
I want High to be counted by MA, not by price. This code doesn't work. I need something similar to iMAOnArray, only iHIGHOnArray. But as far as I know, there is no such thing. Please help me.
 
gheka:

I don't need to manually place the MA on the chart

There are a lot of indicators

help me, people!

I have no explanation in the documentation and the manual, it may take forever to find it on the forum

What do you need it for? Is it used for calculations in the EA or for visualization? Templates will help in some cases.
 
Zhunko:
What do you need it for? Is the MA used for calculations in the Expert Advisor or for visualization? The templates will help in some cases.


The MA is used in the EA, I need it for visualisation as well

If we want to know when to open or close an EA, I want to visualise it on the chart and know when the order triggers

Reason: