This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| Expert Doji Star Pattern | | |
//+------------------------------------------------------------------+ | |
bool DojiStar(double open, double close, double high, double low) | |
{ | |
// Calculate the body size | |
double bodySize = MathAbs(close - open); | |
// Print all the values for debugging | |
//Print("Body Size: ", bodySize, " Open: ", open, " Close: ", close, " High: ", high, " Low: ", low, " Time: ", TimeToString(TimeCurrent())); | |
bool isBodySmall = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| RSI_EA_from_TradeOxy.mq5 | | |
//| AppnologyJames, TradeOxy.com | | |
//| https://www.tradeoxy.com | | |
//+------------------------------------------------------------------+ | |
// CTrade Class | |
#include <Trade\Trade.mqh> | |
input bool liveRSIPrice = false; // Use live RSI price? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| TradeManagement Function | | |
//+------------------------------------------------------------------+ | |
bool TradeManagement(){ | |
// Get the total number of orders | |
int totalOrders = OrdersTotal(); | |
// Get the total number of positions | |
int totalPositions = PositionsTotal(); | |
// If there are no orders or positions, return true | |
if(totalOrders == 0 && totalPositions == 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| Expert tick function | | |
//+------------------------------------------------------------------+ | |
void OnTick() | |
{ | |
bool tradeManagement = TradeManagement(); | |
if(tradeManagement == true){ | |
double rsi = GetRSI(); | |
string signal = RSIAlgorithm(rsi); | |
bool success = OnSignal(signal); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| TradeManagement Function | | |
//+------------------------------------------------------------------+ | |
bool TradeManagement(){ | |
// Get the total number of orders | |
int totalOrders = OrdersTotal(); | |
// Get the total number of positions | |
int totalPositions = PositionsTotal(); | |
// If there are no orders or positions, return true | |
if(totalOrders == 0 && totalPositions == 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| RSI_EA_from_TradeOxy.mq5 | | |
//| AppnologyJames, TradeOxy.com | | |
//| https://www.tradeoxy.com | | |
//+------------------------------------------------------------------+ | |
// CTrade Class | |
#include <Trade\Trade.mqh> | |
input bool liveRSIPrice = false; // Use live RSI price? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
// OnSignal Function | | |
//+------------------------------------------------------------------+ | |
bool OnSignal(string signal){ | |
// Get the current ask price | |
double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); | |
// Get the pip size for the current symbol | |
double pointSize = SymbolInfoDouble(_Symbol, SYMBOL_POINT); | |
// Multiply the point size by 10 to get pips | |
double pipSize = pointSize * 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
// OnSignal Function | | |
//+------------------------------------------------------------------+ | |
bool OnSignal(string signal){ | |
// Get the current ask price | |
double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); | |
// Get the pip size for the current symbol | |
double pointSize = SymbolInfoDouble(_Symbol, SYMBOL_POINT); | |
// Multiply the point size by 10 to get pips | |
double pipSize = pointSize * 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| Expert tick function | | |
//+------------------------------------------------------------------+ | |
void OnTick() | |
{ | |
double rsi = GetRSI(); | |
string signal = RSIAlgorithm(rsi); | |
if(signal == "BUY"){ | |
Print("BUY Signal Detected"); | |
bool result = OnSignal(signal); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
// OnSignal Function | | |
//+------------------------------------------------------------------+ | |
bool OnSignal(string signal){ | |
// Get the current ask price | |
double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); | |
// Get the pip size for the current symbol | |
double pointSize = SymbolInfoDouble(_Symbol, SYMBOL_POINT); | |
// Multiply the point size by 10 to get pips | |
double pipSize = pointSize * 10; |
NewerOlder