this is a snippet of how the magic happens
//Open Buy Order (RSI BURST : BUY), instant signal is tested first
if(Cross(0, iRSI(NULL, PERIOD_CURRENT, 10, PRICE_CLOSE, 0) > TrendlinePriceUpper(0)) //Relative Strength Index crosses above Upper Trendline
)
{
RefreshRates();
price = Ask;
if(!inTimeInterval(TimeCurrent(), TOD_From_Hour, TOD_From_Min, TOD_To_Hour, TOD_To_Min)) return; //open trades only at specific times of the day
if(IsTradeAllowed())
{
ticket = myOrderSend(OP_BUY, price, TradeSize, "RSI BURST : BUY");
if(ticket <= 0) return;
}
else //not autotrading => only send alert
myAlert("order", "RSI BURST : BUY");
moneytree
暂无评论,立马抢沙发