How can i make EA to trade when no Tick data available?

 

I do not use Tick data on chart so there is no Bid Ask

I want to send order from my EA based on Close price only.


I have tried to use trade.Buy and trade.Sell based on <Trade\Trade.mqh>

but on Strategy tester its giving "requote" notification

OnTimer i am sending

double CC = iClose(_Symbol,PERIOD_M1,0); 
trade.Buy(0.1,_Symbol,CC,0,450,"Market order : Buy Executed");
I would appreciate the help, Thanks
 
Dark Ryd3r:

I do not use Tick data on chart so there is no Bid Ask

I want to send order from my EA based on Close price only.


I have tried to use trade.Buy and trade.Sell based on <Trade\Trade.mqh>

but on Strategy tester its giving "requote" notification

OnTimer i am sending

I would appreciate the help, Thanks

What is the message error that you received?

Without the message error I just can send you ideas, so if you wants to send your order on market in the current price, you don't need verify the iCLose, you can just send your order to market like the example below:

trade.Buy(0.1,_Symbol,0.0,0.0,450.0,"Market order : Buy Executed");
 
Dark Ryd3r: I do not use Tick data on chart so there is no Bid Ask I want to send order from my EA based on Close price only.
  1. Close[0] is the Bid.
  2. Any other close will not work, as you can only open at market.
 
vih6460 #:

What is the message error that you received?

Without the message error I just can send you ideas, so if you wants to send your order on market in the current price, you don't need verify the iCLose, you can just send your order to market like the example below:

Thank you. Using close[0], I am getting requote error on strategy tester

 
vih6460 #:

What is the message error that you received?

Without the message error I just can send you ideas, so if you wants to send your order on market in the current price, you don't need verify the iCLose, you can just send your order to market like the example below:

Thank you, it worked like a charm
Reason: