Comments (1)
//+------------------------------------------------------------------+
//| _Siempre Positivo v005.mq4 |
//| Copyright 2021, fdfont GDLab |
//| https://www.globaldesign.cloud |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, fdfont GDLab"
#property link "https://www.globaldesign.cloud"
#property version "6.00"
#property strict
input double lots = 0.01;
input int take_profit = 3;
input double stop_loss = 0;
input int magic = 10;
input int Start_Time = 01; // Time to allow trading to start ( hours of 24 hr clock ) 0 for both disables
input int Finish_Time = 21; // Time to stop trading ( hours of 24 hr clock ) 0 for both disables
datetime MomentoUltimaVela = 0;
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//---
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
int MAX_ORDERS = 8;
int MAX_ORDERS_BUY = 4;
int MAX_ORDERS_SELL = 4;
///////////////////////////////////////////////////////// TRING TO SET THE BUY/SELL TO PAIR…////////
// int orders_buy = 0;
// int orders_sell = 0;
//
//
// for( int i = 0 ; i < OrdersTotal() ; i++ ) {
// // We select the order of index i selecting by position and from the pool of market/pending trades.
// OrderSelect( i, SELECT_BY_POS, MODE_TRADES );
// // If the pair of the order is equal to the pair where the EA is running.
// if (OrderType() == OP_BUY) {
// orders_buy++;
//
//
// }
// }
//
// for( int i = 0 ; i < OrdersTotal() ; i++ ) {
// // We select the order of index i selecting by position and from the pool of market/pending trades.
// OrderSelect( i, SELECT_BY_POS, MODE_TRADES );
// // If the pair of the order is equal to the pair where the EA is running.
// if (OrderType() == OP_SELL) {
// orders_sell++;
//
//
// }
// }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (MomentoUltimaVela != Time[0]){
if(OrdersTotal()<=MAX_ORDERS-1 && OrdersTotal()<=MAX_ORDERS && iRSI(Symbol(),0,14,PRICE_MEDIAN,1)<60 && iRSI(Symbol(),0,14,PRICE_MEDIAN,1)>40 &&
iMA(Symbol(),0,69,1,MODE_LWMA,0,1)>Ask){
if(Hour()>Start_Time && Hour()<Finish_Time){
int compra = OrderSend(Symbol(),OP_BUY,lots,Ask,5,stop_loss,Bid + (MarketInfo(Symbol(),MODE_SPREAD)+1)*Point,"Orden BUY siempre Positivo",magic,0,clrGreen);
MomentoUltimaVela = Time[0];
}
}
if(OrdersTotal()<=MAX_ORDERS-1 && OrdersTotal()<=MAX_ORDERS && iRSI(Symbol(),0,14,PRICE_MEDIAN,1)<60 && iRSI(Symbol(),0,14,PRICE_MEDIAN,1)>40 &&
iMA(Symbol(),0,69,1,MODE_LWMA,0,1)<Bid){
if(Hour()>Start_Time && Hour()<Finish_Time){
int venda = OrderSend(Symbol(),OP_SELL,lots,Bid,5,stop_loss,Bid + (MarketInfo(Symbol(),MODE_SPREAD)-8)*Point,"Orden SELL siempre Positivo",magic,0,clrGreen);
MomentoUltimaVela = Time[0];
}
}
}
}
//+------------------------------------------------------------------+
from globaldesign.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from globaldesign.