NexusFi: Find Your Edge


Home Menu

 





Help with a simple one bar EL strategy


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Mussu with 3 posts (0 thanks)
    2. looks_two ABCTG with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 mtzimmer1 with 1 posts (0 thanks)
    1. trending_up 1,205 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 3 attachments




 
Search this Thread

Help with a simple one bar EL strategy

  #1 (permalink)
 Mussu 
Kankaanpaa Finland
 
Experience: Beginner
Platform: Multichart
Broker: CQG
Trading: Mini-DAX, Bund, VSTOXX, SP1
Posts: 3 since Apr 2019
Thanks Given: 0
Thanks Received: 0

I want help with a simple one bar EL strategy

I'm trying to make a simple EL script, but I have not gotten it to work. Could you help me find the right way to do it.

Everything happens inside the bar, there are no indicators.

Buy = when the price is low (LL) in the Bar
Sell = when the price is high (HH) in the Bar

The picture shows what I mean.



Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Strategy stop orders partially filled
EasyLanguage Programming
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
24 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
17 thanks
GFIs1 1 DAX trade per day journal
13 thanks
EG Indicators
11 thanks
  #3 (permalink)
 
mtzimmer1's Avatar
 mtzimmer1 
Upstate NY
Recovering Method Hopper
 
Experience: Intermediate
Platform: TOS
Broker: TD Ameritrade
Trading: Equities, Treasuries, Gold
Posts: 840 since Dec 2018
Thanks Given: 2,201
Thanks Received: 1,918


To clarify. Do you want the script to buy at the previous bars low and sell at the previous bars high?

If so, then this is the code.

//Begin Code

[intrabarordergeneration=true];

buy next bar at low[1];
sell next bar at high[1];

//End Code

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 Mussu 
Kankaanpaa Finland
 
Experience: Beginner
Platform: Multichart
Broker: CQG
Trading: Mini-DAX, Bund, VSTOXX, SP1
Posts: 3 since Apr 2019
Thanks Given: 0
Thanks Received: 0

Glad you responded so fast.
Yes, that's what I meant.

How to fix EL code for compiling ??

When I removed the colon came
"syntax error, unexpected īsellī"



Started this thread Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Mussu,

the compiler misses the order type - market, stop or limit. You probably want to sell short at the previous high or better and vice versa for your long and therefore a limit order should be used here.

Also keep in mind that the reserved word "Sell" is used for an exit order from a long entry. To enter a short position you would use the reserved word "SellShort".

Apart from that you might not need intrabar order generation and can use Low and High (i.e. next bar Low limit).

Regards,

ABCTG


Mussu View Post
Glad you responded so fast.

Yes, that's what I meant ...

How to fix EL code for compiling ??



Follow me on Twitter Reply With Quote
  #6 (permalink)
 Mussu 
Kankaanpaa Finland
 
Experience: Beginner
Platform: Multichart
Broker: CQG
Trading: Mini-DAX, Bund, VSTOXX, SP1
Posts: 3 since Apr 2019
Thanks Given: 0
Thanks Received: 0

Well, I have got this far ...
Where's the problem now?
I can't continue here, can you help me?
The picture shows what it is all about ??!??!


Started this thread Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Mussu,

"Exit" is not a reserved word that the compiler is aware of.
You might find the EasyLanguage essentials PDF beneficial that you can download here:
https://uploads.tradestation.com/uploads/EasyLanguage-Essentials.pdf

Regards,

ABCTG


Mussu View Post
Well, I have got this far ...
Where's the problem now?
I can't continue here, can you help me?
The picture shows what it is all about ??!??!



Follow me on Twitter Reply With Quote




Last Updated on October 22, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts