please help me convert easy language to pine script - futures io
futures io



please help me convert easy language to pine script


Discussion in Platforms and Indicators

Updated
    1. trending_up 819 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

please help me convert easy language to pine script

(login for full post details)
  #1 (permalink)
ronaldo
tel aviv, israel
 
 
Posts: 3 since Nov 2022
Thanks: 1 given, 0 received

It's simple MA with confirm bars:

{ Buys if Price crosses over Avg and then stays above Avg for one or more bars }

inputs:
Price( Close ) [DisplayName = "Price", ToolTip =
"Enter an EasyLanguage expression to use in the moving average calculations."],
Length( 9 ) [DisplayName = "Length", ToolTip =
"Enter the number of bars used in the calculation of the moving average."],
ConfirmBars( 1 ) [DisplayName = "ConfirmBars", ToolTip =
"Enter the number of bars required to confirm the cross of price above the moving average."];

variables:
Counter( 0 );

if Price > AverageFC( Price, Length ) then
Counter = Counter + 1
else
Counter = 0;

{ CB > ConfirmBars check used to avoid spurious cross confirmation at
CB = ConfirmBars }
if CurrentBar > ConfirmBars and Counter = ConfirmBars then
Buy ( !( "MACrossLE" ) ) next bar at market;

Reply With Quote

Can you help answer these questions
from other members on futures io?
Asking Wall Street Billionaire for Investment Advice
Psychology and Money Management
IKYP - How I solved email troubles on VPS
NinjaTrader
CME 2023 Fee Increases (MES +16%!)
Traders Hideout
strategy builder help
Traders Hideout
Sierra Chart Teton_Denali vs TT Platform
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
1 Tick from the ES/Per day
18 thanks
What if a broker declare bankruptcy!!! Ftx first whose next?
12 thanks
HFT Algo: anyone doing HFT here?
8 thanks
commission
7 thanks
Want your NinjaTrader indicator created, free?
7 thanks
 
(login for full post details)
  #2 (permalink)
doko94
Mulege, Baja California Sur
 
 
Posts: 4 since Nov 2022
Thanks: 0 given, 1 received

Check this Bars above/below EMA in tradingview, just add the strategy entry and modify the ema for ma

Reply With Quote
The following user says Thank You to doko94 for this post:
 
(login for full post details)
  #3 (permalink)
ronaldo
tel aviv, israel
 
 
Posts: 3 since Nov 2022
Thanks: 1 given, 0 received



doko94 View Post
Check this Bars above/below EMA in tradingview, just add the strategy entry and modify the ema for ma

tnx for the help !
any idea why alert is warning about repaint ?
what's to repaint in simple MA ?

Reply With Quote
 
(login for full post details)
  #4 (permalink)
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
 
syswizard's Avatar
 
Posts: 344 since Jan 2019
Thanks: 20 given, 138 received

Where is the Sell logic or other exits ?
Also, you don't check for MarketPosition so the current logic could trigger multiple entries.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
ronaldo
tel aviv, israel
 
 
Posts: 3 since Nov 2022
Thanks: 1 given, 0 received


syswizard View Post
Where is the Sell logic or other exits ?
Also, you don't check for MarketPosition so the current logic could trigger multiple entries.


It's not yet a strategy, just an indicator with alerts.

not sure why repaint issue

Reply With Quote
 
(login for full post details)
  #6 (permalink)
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
 
syswizard's Avatar
 
Posts: 344 since Jan 2019
Thanks: 20 given, 138 received


ronaldo View Post
It's not yet a strategy, just an indicator with alerts.

Then you need to have this statement : Buy ( !( "MACrossLE" ) ) next bar at market;
replaced with a Plot1 statement and then set the colors with SetPlotColor(1,Green) for bullish
and SetPlotColor(1,Red) for bearish.

Reply With Quote


futures io Trading Community Platforms and Indicators > [Ensign]       please help me convert easy language to pine script


Last Updated on November 12, 2022


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2022 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts