short positions - futures io
futures io



short positions


Discussion in EasyLanguage Programming

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,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
 

short positions

(login for full post details)
  #1 (permalink)
sixhundread
Vienna and Austria
 
 
Posts: 36 since Jul 2021
Thanks: 21 given, 7 received

Why does this not open shortpositions at lowest(low,10)[1]?

Thank you!





If close > Highest(High, 10)[1] Then
Buy ("Go Long") next bar at open;

If close < Lowest(Low, 10)[1] then;
Sell Short ("Go Short") next bar at open;


If MarketPosition = 1 Then Begin
If BarsSinceEntry >= 10 Then
Sell this bar at Close;
END;


If MarketPosition = - 1 Then Begin
If BarsSinceEntry >= 10 Then
Sell this bar at Close;
end;

Reply With Quote

Can you help answer these questions
from other members on futures io?
Brad Cowan
Trading Reviews and Vendors
Google Keyword Search Alerts
Traders Hideout
pay for programmer coding a custom indicator
Traders Hideout
Store value in variable when emas crossover easy language
EasyLanguage Programming
TO ALL
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Spoo-nalysis ES e-mini futures S&P 500
61 thanks
Why dont people trade 150 ES contracts?
38 thanks
Any long term success stories from funded traders in the …
26 thanks
How to work on strategy
26 thanks
How to avoid wiping out the accounts?
18 thanks
 
(login for full post details)
  #2 (permalink)
Kolnidrei
Lyon/France
 
 
Posts: 17 since Aug 2012
Thanks: 1 given, 13 received

hi

 
Code
Inputs: 
Periodlookback( 10, 1 ),
Periodtrade( 10, 1 );

If close > Highest(High, Periodlookback)[1] Then
Buy ("Go Long") next bar at open;
If close < Lowest(Low, Periodlookback)[1] then
Sell Short ("Go Short") next bar at open;
If MarketPosition = 1 Then Begin
If BarsSinceEntry >= Periodtrade Then
Sell this bar at Close;
END;
If MarketPosition = - 1 Then Begin
If BarsSinceEntry >= Periodtrade Then
Cover this bar at Close;
end;
the error was near the end ; 'sell' instead of 'cover'...

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > short positions


Last Updated on October 17, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 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