qjol:
MarketInfo(Symbol(), MODE_BID) or Close[0] or iClose()
MarketInfo(Symbol(), MODE_BID) or Close[0] or iClose()
Or Bid.
For the time use . . . .
if( . . . . . && TimeCurrent()%(PERIOD_H1 * 60) >= 59 * 60)
Gotthenut122:
Hello,
I'd like to programm the following simple strategy:
If the current bars price is higher than the (current bars open + the 80% of the current bars range) in the last 1 min of the bars period (H1) the program should buy..
So i want something like this:
if ("current price" > Open[0]+(High[0]-Low[0])*0.8 && TimeCurrent >= Time[0]+ "59min")
...Because you want to open position BUY use Ask as a current price:
if (Ask > (Open[0]+ (High[0]-Low[0])*0.8 ) && TimeCurrent() >= (Time[0]+59*60) )
Thanks paladin80 that worked!
And for sure thanks for the other answers!
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
Hello,
I'd like to programm the following simple strategy:
If the current bars price is higher than the (current bars open + the 80% of the current bars range) in the last 1 min of the bars period (H1) the program should buy..
So i want something like this:
if ("current price" > Open[0]+(High[0]-Low[0])*0.8 && TimeCurrent >= Time[0]+ "59min")
{
OrderSend(Symbol(),OP_BUY,1,Ask,0,0,0);
}
So I dont know how to declare the current price and the "last 1 min".
Thanks,
David