This file contains 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
@echo off | |
REM Put the standalone server, chromedriver, IEdriver, | |
REM the HTML test suite, and your user-extensions.js file | |
REM all in the same folder. Then you can run this bat file | |
REM to launch everything real easy like. | |
REM *firefox | |
REM *mock | |
REM *firefoxproxy |
This file contains 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
double GetMovingAverage() { | |
return iMA(NULL,0,MovingPeriod,MovingShift,MODE_EMA,PRICE_TYPICAL,0); | |
} |
This file contains 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
//int candleDirection = CandleDirection(1); | |
int CandleDirection(int index){ | |
int output = 0; | |
if(Open[index] < Close[index]) { | |
output = 1; | |
} | |
if(Open[index] > Close[index]) { | |
output = -1; | |
} |
This file contains 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
// bool candleIsStrong = CandleIsStrong(1); | |
bool CandleIsStrong(int index) { | |
bool output = false; | |
double totalHeight = High[index] - Low[index]; | |
double bodyHeight = MathAbs(Open[index] - Close[index]); | |
if(totalHeight != 0 && bodyHeight != 0) { | |
output = ((totalHeight / bodyHeight) > 1.3); | |
} |
This file contains 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
// int adxIndicator = AdxIndicator(20, 14, 0); | |
int AdxIndicator(int adxThreshold, int period, int shift) { | |
double adx = iADX(Symbol(),PERIOD_CURRENT,period,PRICE_TYPICAL,MODE_MAIN,shift); | |
//double adxDiPlus = iADX(Symbol(),PERIOD_CURRENT,period,PRICE_TYPICAL,MODE_PLUSDI,shift); | |
//double adxDiMinus = iADX(Symbol(),PERIOD_CURRENT,period,PRICE_TYPICAL,MODE_MINUSDI,shift); | |
int output = 0; | |
This file contains 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
input int MovingPeriod = 12; | |
input int MovingShift = 0; | |
double GetMacd(int mode, int period, int shift) { | |
int fastEmaPeriod = period / 2.1555; | |
int slowEmaPeriod = period; | |
int signalPeriod = (period / 2.1555) * 0.75; | |
return iMACD(Symbol(),0,fastEmaPeriod,slowEmaPeriod,signalPeriod,PRICE_TYPICAL,mode,shift); | |
} |
This file contains 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
// Gets the range (highest minus lowest) of price for the last 5 bars | |
// double currentRange = CalculateCurrentRange(5); | |
double CalculateCurrentRange(int howManyBars){ | |
double highVal; | |
double lowVal; | |
int highVal_index=iHighest(NULL,0,MODE_HIGH,howManyBars,0); | |
int lowVal_index=iLowest(NULL,0,MODE_LOW,howManyBars,0); | |
This file contains 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
// int result = OpenBuyOrder(0.01, 0.00300, 0.0900); | |
int OpenBuyOrder(double lots, double stopLossPips, double pipsProfit){ | |
double takeProfit = NormalizeDouble(Ask + pipsProfit, Digits); | |
double stopLoss =NormalizeDouble(Ask - stopLossPips, Digits); | |
return OrderSend(Symbol(),OP_BUY,lots,Ask,3,stopLoss,takeProfit,"",MAGICMA,0,clrPurple); | |
} |
This file contains 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
// int result = OpenSellOrder(0.01, 0.00300, 0.00900); | |
int OpenSellOrder(double lots, double stopLossPips, double pipsProfit){ | |
double takeProfit = NormalizeDouble(Bid - pipsProfit, Digits); | |
double stopLoss = NormalizeDouble(Bid + stopLossPips, Digits); | |
return OrderSend(Symbol(),OP_SELL,lots,Bid,3,stopLoss,takeProfit,"",MAGICMA,0,clrPink); | |
} |
This file contains 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
// bool result = CloseOpenOrder(5); | |
// closes the currently selected order | |
bool CloseOpenOrder(int slippage){ | |
double price; | |
if(OrderType() == OP_SELL) { | |
price = Ask; | |
} else { | |
price = Bid; | |
} |
OlderNewer