Hello coders, please can anyone try to add on chart adjustable arrows (change colour and size) for the slope signal to this indicator.
It already has alerts. Many thanks in advance..
It already has alerts. Many thanks in advance..
Attached File(s)
I will code your pivot EAs for no charge 28 replies
I will code your scalping EAs for no charge 163 replies
Oanda MT4 - Indicators and EAs not showing 2 replies
EAs and indicators relating to moutaki... 22 replies
InterbankFX has loaded its MT4 platform with custom EAs, indicators and scripts 1 reply
Disliked{quote} The file to modify is DLabs Index test Pair only.mq4 I just posted the other files as they are the source for the indication used in the Pair only in iCustom (...) It was meant to be understood that when I drag and drop a pair from symbol list it automatically select the 2 currencies accordingly as it is done in the CurrencySlopeStrength attached My problem is that the constants Cur1 & Cur2 cannot be modified and I don't know how to get around the issue. May be...Ignored
Disliked{quote} for(i=limit, r=rates_total-limit-1; i>=0; i--,r++) { double max = (r>0) ? fmax(high,close[i+1]) : close; double min = (r>0) ? fmin( low,close[i+1]) : close; double bp = (max!=min) ? close - min : 0; // selling pressure double sp = (max!=min) ? max - close : 0; // selling pressure bpma = iBp.OnCalculate(bp,r,rates_total); spma = iSp.OnCalculate(sp,r,rates_total); // add these lines of code: if( i < limit ) { if( bpma[i+1] < spma[i+1] && bpma > spma ) { Alert(Symbol()," ", " Buy " ); } else if( bpma[i+1] > spma[i+1]...Ignored
Disliked{quote} You can play with the settings. Each TF and RSI are individually settable, however don't expect an EA to work the same as your manual touch ! RSI_ Shift_ TF1 and 2 are only there to select the Candle Close position at RSI Cross: 0 = Current, 1 = Previous Candle , etc... It surely isn't "the holy grail"as you suggested !Ignored
DislikedAnyone know how to code the order lots size in that way. Extern inputs: extern double Lot1=0.01; extern double Lot2=0.01; extern double Lot3=0.01; extern double Lot4=0.01; extern double Lot5=0.1; extern double Lot6=0.2; extern double Lot7=0.3; extern double Lot8=0.5; extern double Lot9=0.9; extern double Lot10=1.6; extern double Lot11=3.7; extern double Lot12=11.3; so it can trade to place lot sizes in that order or whatever inputs I put. Need mql code so I can use it in an EA. When order is close with TP it starts from beginning with Lots1. Will...Ignored
Disliked{quote} Could this indicator be modified to use on other pairs and metals?Ignored
Disliked{quote} Pls help to check why that error on 134 i already removed ( for) i know no coding so i copied and paste . {image}Ignored
Disliked{quote} Hello! I tried your EA again. It looks like one chart was triggered (15m) But not on 30m tf (see picture) When the clock was 10 pm it already had crossed 9.30 pm. They must cross the 50 level at same time. Is this possible to fix? Henning {image}Ignored
//@version=4
//Time Frame: H1
strategy("Pin Bar Magic v1", overlay=true)
// User Input
usr_risk = input(title="Equity Risk (%)",type=input.integer,minval=1,maxval=100,step=1,defval=3,confirm=false)
atr_mult = input(title="Stop Loss (x*ATR, Float)",type=input.float,minval=0.1,maxval=100,step=0.1,defval=0.5,confirm=false)
slPoints = input(title="Stop Loss Trail Points (Pips)",type=input.integer,minval=1,maxval=1000,step=1,defval=1,confirm=false)
slOffset = input(title="Stop Loss Trail Offset (Pips)",type=input.integer,minval=1,maxval=1000,step=1,defval=1,confirm=false)
sma_slow = input(title="Slow SMA (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=50,confirm=false)
ema_medm = input(title="Medm EMA (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=18,confirm=false)
ema_fast = input(title="Fast EMA (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=6,confirm=false)
atr_valu = input(title="ATR (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=14,confirm=false)
ent_canc = input(title="Cancel Entry After X Bars (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=3,confirm=false)
// Create Indicators
slowSMA = sma(close, sma_slow)
medmEMA = ema(close, ema_medm)
fastEMA = ema(close, ema_fast)
bullishPinBar = ((close > open) and ((open - low) > 0.66 * (high - low))) or ((close < open) and ((close - low) > 0.66 * (high - low)))
bearishPinBar = ((close > open) and ((high - close) > 0.66 * (high - low))) or ((close < open) and ((high - open) > 0.66 * (high - low)))
atr = atr(atr_valu)
// Specify Trend Conditions
fanUpTrend = (fastEMA > medmEMA) and (medmEMA > slowSMA)
fanDnTrend = (fastEMA < medmEMA) and (medmEMA < slowSMA)
// Specify Piercing Conditions
bullPierce = ((low < fastEMA) and (open > fastEMA) and (close > fastEMA)) or ((low < medmEMA) and (open > medmEMA) and (close > medmEMA)) or ((low < slowSMA) and (open > slowSMA) and (close > slowSMA))
bearPierce = ((high > fastEMA) and (open < fastEMA) and (close < fastEMA)) or ((high > medmEMA) and (open < medmEMA) and (close < medmEMA)) or ((high > slowSMA) and (open < slowSMA) and (close < slowSMA))
// Specify Entry Conditions
longEntry = fanUpTrend and bullishPinBar and bullPierce
shortEntry = fanDnTrend and bearishPinBar and bearPierce
// Long Entry Function
enterlong() =>
risk = usr_risk * 0.01 * strategy.equity
stopLoss = low[1] - atr[1] * atr_mult
entryPrice = high[1]
units = risk / (entryPrice - stopLoss)
strategy.entry("long", strategy.long, units, stop=entryPrice)
strategy.exit("exit long", from_entry="long", trail_points=slPoints, trail_offset=slOffset)
// Short Entry Function
entershort() =>
risk = usr_risk * 0.01 * strategy.equity
stopLoss = high[1] + atr[1] * atr_mult
entryPrice = low[1]
units = risk / (stopLoss - entryPrice)
strategy.entry("short", strategy.short, units, stop=entryPrice)
strategy.exit("exit short", from_entry="short", trail_points=slPoints, trail_offset=slOffset)
// Execute Long Entry
if (longEntry)
enterlong()
// Execute Short Entry
if (shortEntry)
entershort()
// Cancel the Entry if Bar Time is Exceeded
strategy.cancel("long", barssince(longEntry) > ent_canc)
strategy.cancel("short", barssince(shortEntry) > ent_canc)
// Force Close During Certain Conditions
strategy.close_all(when = hour==16 and dayofweek==dayofweek.friday, comment = "exit all, market-closed")
strategy.close_all(when = crossunder(fastEMA, medmEMA), comment = "exit long, re-cross")
strategy.close_all(when = crossover(fastEMA, medmEMA), comment = "exit short, re-cross")
// Plot Moving Averages to Chart
plot(fastEMA, color=color.red)
plot(medmEMA, color=color.blue)
plot(slowSMA, color=color.green)
// Plot Pin Bars to Chart
plotshape(bullishPinBar, text='Bull PB', style=shape.labeldown, location=location.abovebar, color=color.green, textcolor=color.white, transp=0)
plotshape(bearishPinBar, text='Bear PB', style=shape.labelup, location=location.belowbar, color=color.red, textcolor=color.white, transp=0)
// Plot Days of Week
plotshape(hour==0 and dayofweek==dayofweek.monday, text='Monday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.tuesday, text='Tuesday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.wednesday, text='Wednesday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.thursday, text='Thursday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.friday, text='Friday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==16 and dayofweek==dayofweek.friday, text='Market Closed', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0) //+------------------------------------------------------------------+
//| Pin Bar Magic v1|
//| THT Team|
//| 2023-04-05|
//+------------------------------------------------------------------+
#property copyright "THT Team"
#property link "https://thtteam.com/"
#property version "1.00"
#property strict
extern int usr_risk = 3; // Equity Risk (%)
extern double atr_mult = 0.5; // Stop Loss (x*ATR, Float)
extern int slPoints = 1; // Stop Loss Trail Points (Pips)
extern int slOffset = 1; // Stop Loss Trail Offset (Pips)
extern int sma_slow = 50; // Slow SMA (Period)
extern int ema_medm = 18; // Medm EMA (Period)
extern int ema_fast = 6; // Fast EMA (Period)
extern int atr_valu = 14; // ATR (Period)
extern int ent_canc = 3; // Cancel Entry After X Bars (Period)
double slowSMA;
double medmEMA;
double fastEMA;
bool bullishPinBar;
bool bearishPinBar;
double atr;
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
SetProfitMode(false);
SetMarginMode(1);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
}
//+------------------------------------------------------------------+
//| Check if market is open |
//+------------------------------------------------------------------+
bool isMarketOpen()
{
return true; // replace with your own implementation
}
//+------------------------------------------------------------------+
//| Specify Trend Conditions |
//+------------------------------------------------------------------+
bool fanUpTrend()
{
return (fastEMA > medmEMA) && (medmEMA > slowSMA);
}
bool fanDnTrend()
{
return (fastEMA < medmEMA) && (medmEMA < slowSMA);
}
//+------------------------------------------------------------------+
//| Specify Piercing Conditions |
//+------------------------------------------------------------------+
bool bullPierce()
{
return ((Low[0] < fastEMA) && (Open[0] > fastEMA) && (Close[0] > fastEMA)) ||
((Low[0] < medmEMA) && (Open[0] > medmEMA) && (Close[0] > medmEMA)) ||
((Low[0] < slowSMA) && (Open[0] > slowSMA) && (Close[0] > slowSMA));
}
bool bearPierce()
{
return ((High[0] > fastEMA) && (Open[0] < fastEMA) && (Close[0] < fastEMA)) ||
((High[0] > medmEMA) && (Open[0] < medmEMA) && (Close[0] < medmEMA)) ||
((High[0] > slowSMA) && (Open[0] < slowSMA) && (Close[0] < slowSMA));
}
//+------------------------------------------------------------------+
//| Long Entry Function |
//+------------------------------------------------------------------+
void enterlong()
{
double risk = usr_risk * 0.01 * AccountEquity();
double stopLoss = Low[1 DislikedHi All, I will appreciate it if someone will help to fix this EA. It is based on the Demarker indicator. Simple buy and sell upon crossover. It has compilation errors. Please find attached. Looking forward to your assistance. {file}Ignored
DislikedHello guys. Is there any availibility to create EA from this pine script? I found this strategy on TradingView. //@version=4 //Time Frame: H1 strategy("Pin Bar Magic v1", overlay=true) // User Input usr_risk = input(title="Equity Risk (%)",type=input.integer,minval=1,maxval=100,step=1,defval=3,confirm=false) atr_mult = input(title="Stop Loss (x*ATR, Float)",type=input.float,minval=0.1,maxval=100,step=0.1,defval=0.5,confirm=false) slPoints = input(title="Stop Loss Trail Points (Pips)",type=input.integer,minval=1,maxval=1000,step=1,defval=1,confirm=false)...Ignored
Disliked{quote} I see! This is because its waiting for the candle to close before taking the trade. For example, the 9:30pm candle starts at 9:30pm and ends at 10pm. So the close of the 9:30pm candle is at 10pm. The EA looks at the close of the 9:30pm candle and compares that with the close of the 9pm candle (if on 30 minute chart). If the 9pm candle closes under 50, and the 9:30pm candle closes above 50, then it "crossed the 50 line up" (and vice versa for cross down) {image} The issue with using the current candle is that you might get false crosses (price...Ignored
Disliked{quote} This code is very incomplete. The original coder did not list the variables used inside of the functions (like the Lot Size Percentage)Ignored
Disliked{quote} Just add the variable in separate OrderSend functions... OrderSend(_Symbol,OP_BUY,Lot1,......) OrderSend(_Symbol,OP_BUY,Lot2,......) etcIgnored