NexusFi: Find Your Edge


Home Menu

 





Help on one day reversal strategy coding.


Discussion in MultiCharts

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




 
Search this Thread
  #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?
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
The June 15 Resolution Trap: Irans Agreed Text Still Pri …
Prediction Markets & Event Contracts
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
Iran Talks Final Stages -- Two VLCCs Exit Hormuz, Record …
Traders Hideout
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643


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 X Reply With Quote




Last Updated on July 20, 2016


© 2026 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 - Downloads - Top
no new posts