Skip to main content

Posts

Showing posts from September, 2023

binary 2min stratigy

//@version=5 indicator("Binary Option Strategy (EUR/USD)", overlay=true) // Input for selecting the moving average type and periods fastMA = input.int(50, title="Fast Moving Average Period") slowMA = input.int(200, title="Slow Moving Average Period") // Calculate the selected moving averages fastSMA = ta.sma(close, fastMA) slowSMA = ta.sma(close, slowMA) // Define the trend as "Up" when the fast MA is above the slow MA, and "Down" otherwise trend = fastSMA > slowSMA ? "Up" : "Down" // Plot the moving averages on the chart (optional) plot(fastSMA, color=color.blue, title="Fast SMA") plot(slowSMA, color=color.red, title="Slow SMA") // Entry conditions callEntry = ta.crossover(close, fastSMA) and trend == "Up" putEntry = ta.crossunder(close, fastSMA) and trend == "Down" // Plot arrows on the chart for entry signals plotarrow(callEntry ? 1 : putEntry ? -1 : na, colorup=col...