[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 574
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
like this maybe i am wrong i am just learning
I'm learning, too )
Why are all ask values (ask1, ask2, ask3) zero?
but the TimeCurrent() function, it reverts the time of the last quote, it needs the price.
If price increases after three last ticks (ask3>ask2>ask1), then open buy order
In any case thanks) !!
Of course, you should open an order or buy or sell the next or one of the following bars. I also plan to close by an order predicting it by the number of points from the opening.
See trailer. Place its contents in the Experts folder of the terminal. Select the timeframe of the instrument you are interested in and place it on the chart of the Expert Advisor,
Set parameters for opening an order in MetaTrader external variables:
Then you wait for the formation of a new bar on the selected timeframe of the instrument.
When the Expert Advisor opens an order from the market, you compare the time of its opening with the time of the new bar opening.
Assuming that the EA handles every tick, then it is better to do things a little differently
Vinin, thank you very much for your reply. But to be honest I don't really understand why ask1, ask2, ask3 are assigned values 1,-1,-1. What do they mean? If you can not difficultly describe in words what and how it happens, I'm a beginner, not quite well understand everything. I will be very grateful to you).
I'm learning, too )
Why are all ask values (ask1, ask2, ask3) zero?
but the TimeCurrent() function, it reverts the time of the last quote, it needs the price.
The idea is that if price increases after three last ticks (ask3>ask2>ask1), then we open BUY ORDER
In any case thanks) !!
Timecurrent () asks for a new tick, and if the time is new, we assign a new tick to Ask2 or Ask3.
Then, compare Ask1 and Ask2 and Ask3 like this
datetime ask=TimeCurrent();
double ask1=0,ask2=0,ask3=0;
ask1=Ask;
if(ask!=TimeCurrent()){ask2=Ask;ask=TimeCurrent()}
if(ask!=TimeCurrent()){ask3=Ask;}
if((ask1>ask2)&&(ask2>ask3)){......then write the code}
I'm learning, too )
Why are all ask values (ask1, ask2, ask3) zero?
but the TimeCurrent() function, it reverts the time of the last quote, it needs the price.
If price increases (ask3>ask2>ask1), then open buy order
In any case thanks) !!
Timecurrent () asks for a new tick, and if the time is new, we assign a new tick to Ask2 or Ask3.
Then, compare Ask1 and Ask2 and Ask3 like this
datetime ask=TimeCurrent();
double ask1=0,ask2=0,ask3=0;
ask1=Ask;
if(ask!=TimeCurrent()){ask2=Ask;ask=TimeCurrent()}
if(ask!=TimeCurrent()){ask3=Ask;}
if((ask1>ask2)&&(ask2>ask3)){......then write code}
I'm learning, too )
Why are all ask values (ask1, ask2, ask3) zero?
but the TimeCurrent() function, it reverts the time of the last quote, it needs the price.
If price increases after three last ticks (ask3>ask2>ask1), then open buy order
In any case thanks) !!
Timecurrent () asks for a new tick, and if the time is new, we assign a new tick to Ask2 or Ask3.
Then compare asc1 and asc2 and asc3 like this
Timecurrent () asks for a new tick, and if the time is new, assign the value of the new tick to Ask2 or Ask3.
Then compare Ask1 and Ask2 and Ask3 like this
datetime ask=TimeCurrent();
double ask1=0,ask2=0,ask3=0;
ask1=Ask;
if(ask!=TimeCurrent()){ask2=Ask;ask=TimeCurrent()}
if(ask!=TimeCurrent()){ask3=Ask;}
if((ask1>ask2)&&(ask2>ask3)){......then write the code}
I'll give it a try, thanks)
Timecurrent () asks for a new tick, and if the time is new, assign the value of the new tick to Ask2 or Ask3.
Then compare Ask1 and Ask2 and Ask3 like this
datetime ask=TimeCurrent();
double ask1=0,ask2=0,ask3=0;
ask1=Ask;
if(ask!=TimeCurrent()){ask2=Ask;ask=TimeCurrent()}
if(ask!=TimeCurrent()){ask3=Ask;}
if((ask1>ask2)&&(ask2>ask3)){......then write the code}
I'll give it a try, thanks)
I'll give it a try, thanks)
only in this case ask1 is the oldest price... i.e.
if ((ask2>ask1)&&(ask3>ask2)){......}
to Armen63