ignore the first indicator
i meant the "insideqbarnv2.mq4"
if (MarketInfo(Symbol() ,Bid > entryBuyStop)
Perhaps you should read the manual. MarketInfo - Market Info - MQL4 Reference The second argument is one of Symbol Properties - Environment State - Standard Constants, Enumerations and Structures - MQL4 Reference True or False isn't one of them. And if you meant,if (MarketInfo(Symbol() ,Bid) > entryBuyStop)
1.2345 isn't one of them either.up[i] = Low[i] - iATR(Symbol(),0,500,i)/3;
Your image shows the top and bottom of the bar and twice that range. What does ATR have to do with it?- Once you find a IB where do you set the count to zero?
- Once you find a IB where do you see if the target has been hit?
- Once you find a IB where do you count if High > High[IB]
- Perhaps you should read the manual. MarketInfo - Market Info - MQL4 Reference The second argument is one of Symbol Properties - Environment State - Standard Constants, Enumerations and Structures - MQL4 Reference True or False isn't one of them. And if you meant,1.2345 isn't one of them either.
- Your image shows the top and bottom of the bar and twice that range. What does ATR have to do with it?
- Once you find a IB where do you set the count to zero?
- Once you find a IB where do you see if the target has been hit?
- Once you find a IB where do you count if High > High[IB]
HI WHRoeder,
thanks for your answer,
such a novice mistake, i did meant the second
1. (MarketInfo(Symbol() ,MODE_BID) > entryBuyStop ) isn't comparable?, isn't MarketInfo returns a double?
2. the ATR is just so when createObject draws it will do it far from the candle, i've found the code somewhere ,guess it isn't necessary
3. I've declared inPosition variable set to zero in the global declaration sector or should it be in init() function I'm not sure (tried both)
either way i've set it to zero once the target hits
4. Im saving the target prices in buyTp and sellTp which are the lines of twice the range
5. line 68, its supposed to : if price breaks either sell or buy stop inPosition increases by one until it reaches the targets and then it sets to zero again
if (MarketInfo(Symbol() ,MODE_BID) > entryBuyStop || MarketInfo(Symbol(), MODE_ASK) < entrySellStop) { inPosition++;
- MarketInfo(Symbol() ,MODE_BID) is the same as the predefined variable Bid. Why use a function call?
- Why would you compare the current price, you want to know wether a candle exceeded your stop, not wether the current price does.
yes, you're right
i need to count once every time price breaks a line, until price breaks the other line , or until the target lines are hit
thanks

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
cant seem to make my indicator work
if i have an inside bar , i want the indicator to display on graph the number of times price hits the high and low of the candle before it reaches its target of 1:1 R:R
atteched is i want it to work and the indicator i tried to write, its a problem with inPosition calculation of course but i dont know what to change
any advice will do
thanks