
Convert Pinescript to Easy Language for Tradestation 10.0
$10-30 USD
Оплачивается при доставке
I have numerous indicators that need a direct conversion. I also have some that are partially written in easy language but I have coding errors that need to be debugged. Payment is made upon verification that the indicators are plotting properly.
below is an example of Pinescript that needs to be converted to easy language directly.
After this is an example of the same indicator in Easy Language PaintBar study that needs debugging.
DIRECT CONVERSION
study('Volume fight')
ma = input(24, 'Search_range', minval=1,tooltip='The range of estimation of the predominance of bullish or bearish volume (quantity bars). The smaller the TF, the higher the range value should be used to filter out false signals.
delta = input(15, 'Smoothing_for_flat,%', step=0.5, minval=0,tooltip='Smoothing to reduce false signals and highlight the flat zone. If you set the percentage to zero, the flat zones will not be highlighted, but there will be much more false signals, since the indicator becomes very sensitive when the smoothing percentage decreases.
bgshow = input(false, 'Show background zones',tooltip='Show the color background of the current trading zone.
all_signal_show = input(false, 'Show each setup in zone',tooltip='Show and use signals every time in trading zone.
///// CALCULATION
bull_vol = open<close ? volume : volume*(high-open)/(high-low) //determine the share of bullish volume
bear_vol = open>close ? volume : volume*(open-low)/(high-low) //determine the share of bearish volume
avg_bull_vol = vwma(bull_vol,ma), avg_bear_vol = vwma(bear_vol,ma) //determine vwma
diff_vol = sma((avg_bull_vol/volume-1)-(avg_bear_vol/volume-1),ma) //normalize and smooth the values
vol_flat = abs(avg_bull_vol+avg_bear_vol)/2 //determine average value for calculation flat-filter
///// SIGNALS
up = int(na), up := nz(up[1]), dn = int(na), dn := nz(dn[1]) //variables
bull = avg_bull_vol>avg_bear_vol and vol_flat/avg_bull_vol<(1-delta/100) //determine up zones
bear = avg_bull_vol<avg_bear_vol and vol_flat/avg_bear_vol<(1-delta/100) //determine dn zones
if bull
up += 1, dn := 0
if bear
dn += 1, up := 0
if not bull and not bear and all_signal_show
up :=0, dn := 0
alertcondition(bull and up==1,'UP','UP - Bullish movement') //UP - alert
alertcondition(bear and dn==1,'DN','DN - Bearish movement') //DN - alert
///// PLOTTING
plotshape(bull and up==1, 'UP', location=[login to view URL], style = [login to view URL], color=[login to view URL], size=[login to view URL])
plotshape(bear and dn==1, 'DN', location=[login to view URL], style = [login to view URL], color=[login to view URL], size=[login to view URL])
bgcolor(title='Trading zones',color = bgshow and avg_bull_vol>avg_bear_vol and vol_flat/avg_bull_vol<(1-delta/100) ? [login to view URL]([login to view URL],85) : bgshow and avg_bull_vol<avg_bear_vol and vol_flat/avg_bear_vol<(1-delta/100) ? [login to view URL]([login to view URL],85) : na)
plot(diff_vol, 'Volume difference', style=plot.style_area, color = avg_bull_vol>avg_bear_vol and vol_flat/avg_bull_vol<(1-delta/100) ? [login to view URL]([login to view URL],0) : avg_bull_vol<avg_bear_vol and vol_flat/avg_bear_vol<(1-delta/100) ? [login to view URL]([login to view URL],0) : [login to view URL]([login to view URL],50))
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
PARTIALLY VERIFIED CODE THAT NEEDS DEBUGGING
VOLUME FIGHT INDICATOR
Inputs: ma(24), // Search_range
deltalen(15), // Smoothing_for_flat,%
bgshow(false), // Show background zones
all_signal_show(false); // Show each setup in zone
Variables: bull_vol(0), bear_vol(0), avg_bull_vol(0), avg_bear_vol(0),
diff_vol(0), vol_flat(0), up(0), dn(0), bull(false), bear(false);
bull_vol = IFF(Open < Close, Volume, Volume * (High - Open) / (High - Low));
bear_vol = IFF(Open > Close, Volume, Volume * (Open - Low) / (High - Low));
avg_bull_vol = Average(bull_vol, ma);
avg_bear_vol = Average(bear_vol, ma);
diff_vol = Average((avg_bull_vol / Volume - 1) - (avg_bear_vol / Volume - 1), ma);
vol_flat = AbsValue(avg_bull_vol + avg_bear_vol) / 2;
{
up = IFF(IsNan(up[1]), 0, up[1]);
dn = IFF(IsNan(dn[1]), 0, dn[1]);
}
bull = avg_bull_vol > avg_bear_vol AND vol_flat / avg_bull_vol < (1 - deltalen / 100);
bear = avg_bull_vol < avg_bear_vol AND vol_flat / avg_bear_vol < (1 - deltalen / 100);
if bull then
up = up + 1;
dn = 0;
if bear then
dn = dn + 1;
up = 0;
if NOT bull AND NOT bear AND all_signal_show then
begin
up = 0;
dn = 0;
end;
{
AlertCondition(bull AND up = 1, "UP", "UP - Bullish movement");
AlertCondition(bear AND dn = 1, "DN", "DN - Bearish movement");
PlotPaintBar(bull AND up = 1, "UP", Bottom, TriangleUp, Green);
PlotPaintBar(bear AND dn = 1, "DN", Top, TriangleDown, Red);
}
If bgshow AND avg_bull_vol > avg_bear_vol AND vol_flat / avg_bull_vol < (1 - deltalen / 100) Then
SetPlotColor(1, RGB(0, 255, 0))
Else If bgshow AND avg_bull_vol < avg_bear_vol AND vol_flat / avg_bear_vol < (1 - deltalen / 100) Then
SetPlotColor(1, RGB(255, 0, 0))
Else
SetPlotColor(1, GetPlotColor(1));
Plot1(diff_vol, "Volume difference", IFF(avg_bull_vol > avg_bear_vol AND vol_flat / avg_bull_vol < (1 - deltalen / 100), RGB(0, 255, 0), IFF(avg_bull_vol < avg_bear_vol AND vol_flat / avg_bear_vol < (1 - deltalen / 100), RGB(255, 0, 0), RGB(128, 128, 128))), 0);
ID проекта: #37259803
О проекте
1 фрилансер в среднем готов выполнить эту работу за $20
Hello, i can help you to fix this pinescript, and make it work properly, please contact for the details and i'll start my work