NexusFi: Find Your Edge


Home Menu

 





Help on one day reversal strategy coding.


Discussion in MultiCharts

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




 
Search this Thread

Help on one day reversal strategy coding.

  #1 (permalink)
Dallasboy
dallas texas
 
Posts: 17 since Jan 2016
Thanks Given: 6
Thanks Received: 4

Hi all,

I am try to code this simple reversal strategy:

If previous day open < close (an up bar), then sellshort the next bar.
Stop is previous bar's high (the up bar) plus say 25% of range.

 
Code
inputs:
	StopLoss ((high[1]-low[1])*.25);
	
if open < close then
	sellshort next bar at open;


SetStopShare;

SetStopLoss (StopLoss+(high[1]-open));

setexitonclose;
It tries to use the values from 2 bar back it seems.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Quantum physics & Trading dynamics
The Elite Circle
Strategy stop orders partially filled
EasyLanguage Programming
OrderFlow-Based Support/Resistance Levels
Emini and Emicro Index
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
26 thanks
ApexTraderFunding.com experience and review
13 thanks
Trading with Intuition
12 thanks
GFIs1 1 DAX trade per day journal
9 thanks
FootPrintV2 Chart for NT8
7 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


Dallasboy View Post
It tries to use the values from 2 bar back it seems.

Dallasboy,

for what does it seem to use the values from two bars back?
The entries seem exactly where you'd expect them i.e. the next bar after a bar that had an open lower then the close.

For the stop amount this might be caused by your code not using intrabar order generation, which means values are updated at the end of the bar only.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on July 20, 2016


© 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