[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 488
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
iLow
I'm a bit stuck on the implementation of the order placing algorithm.
The essence is that there is a ticket, I switch on the enumeration with a condition to find the ticket:
If any of the orders corresponds to a magik, we modify it.
We have another task: if none of the orders corresponds to a Magic, we should set a new pending order. if(OrderMagicNumber()!=magic) will not work here.
How can we implement this condition without resorting to third-party custom functions?
It is very simple. Create some boolean variable. Before processing orders, set it to false. As soon as the order is processed, change it to true. After you have checked all of the orders, check the value of the variable - if it remains false, it means that there has been no order with the needed magic. You open a new order.
It's very simple. Create a boolean variable. Set it to false before processing orders. As soon as the order is processed, change it to true. After you have checked all of the orders, check the value of the variable - if it remains false, it means that there has been no order with the needed magic. You open a new order.
Try to play around with (edit to your needs) Kim's isCloseLastPosByStop - Returns flag to close last position by stop
and NumberOfPositions - Returns the number of positions, and maybe others will suit your question...
I decided to understand how the ATR indicator works , and at the same time to study its code. I got the gist of it, but it's written strangely.
Here is its start function:
Here is the first block of confusion:
What is the sense of doing something if the counted_bars value <1. In my opinion, it means that the indicator hasn't counted any bar and I should just exit the function as there are no values yet... What is the catch?
Why AtrBuffer has the index[Bars-i]? I understood that the idea is to set the buffer to 0.0 if there are no values. But it turns out that the value 0.0 is defined only for bars from (Bars) to (AtrPeriod), while fromAtrPeriod to the 0-th bar nothing is written to the buffer. Why?
I do not understand the logic of this code fragment
In the next block:
In the line:
Condition if i==Bars-1. It appears that the value of the 1st bar from the beginning of the chart on the left is taken into account... But this is very far away, what good is this value?
I need some help!
How can I make an EA close all open and pending orders at a given drawdown level, for example 30%, and then restart it and start all over again?Could you please tell me what should be in the datetime expiration parameter in the order placing function, so that the pending order would delete itself after 5 minutes if it has not worked? Is it TimeCurrent()+300 or not?
Could you please tell me what should be in the datetime expiration parameter in the order placing function, so that the pending order would delete itself after 5 minutes if it has not worked? Is it TimeCurrent()+300 or not?
Hi all. Love to help out, bet 0.10 stop 200pip how much do I need to have to sustain 200pip?