NexusFi: Find Your Edge


Home Menu

 





Help needed in coding afl


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one johny with 1 posts (0 thanks)
    2. looks_two milkysahai001 with 1 posts (0 thanks)
    3. looks_3 aryan advisory with 1 posts (0 thanks)
    4. looks_4 meeget13 with 1 posts (0 thanks)
    1. trending_up 2,545 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
milkysahai001
Agra+India
 
Posts: 42 since Sep 2016
Thanks Given: 17
Thanks Received: 3

below is my simple stochastics strategy.i am using this on symphony presto amifuse trading on this bar close price.
i want the trades to take place on next bar open price. but not able to do so. i have also attached the code for presto amifuse- for signal generation.
please help me in getting signals on next bar open.


P=Param("Periods", 14, 5, 30, 1);
PD=Param("Oscillator Avg", 3, 3, 30, 1);
PD1=Param("Smooth1", 3, 3, 30, 1);

res=HHV(H,P);
sup=LLV(L,P);
avd=IIf(C>Ref(res,(RP*-1)), 1, IIf(C<Ref(sup,(RP*-1)), -1, 0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
Plot(tsl, "trend", colorWhite, styleStaircase);

A=Close;
B=(A-LLV(L,P))/(HHV(H,P)-LLV(L,P));
D=MA(B,PD);
D1=MA(D, PD1);

Buy=((Cross(D, D1) AND avn==1));
Sell=D<D1;
Short=((Cross(D1, D) AND avn==-1));
Cover=D>D1;

Buy=ExRem(Buy, Sell);
Sell=ExRem(Sell, Buy);
Short=ExRem(Short, Cover);
Cover=ExRem(Cover, Short);

PlotShapes(IIf(LongSignal, shapeUpArrow, shapeNone), colorWhite);
PlotShapes(IIf(ShortSignal, shapeDownArrow, shapeNone), colorYellow);
PlotShapes(IIf(Sellsignal, shapeStar, shapeNone), colorYellow);
PlotShapes(IIf(CoverSignal, shapeStar, shapeNone), colorWhite);

_SECTION_BEGIN("presto1");
a2=(Sell);
a4=(Cover);
a1=(Buy);
a3=(Short);
a5=Ref(C,-1);
a6=Ref(C,-1);
a7=0;

if(a2[BarCount-2]==1)
{
SellToFuse(a5[BarCount-1],a6[BarCount-2]);
}

if(a4[BarCount-2]==1)
{
CoverToFuse(a5[BarCount-1],a6[BarCount-2]);
}

if(a1[BarCount-2]==1)
{
BuyToFuse(a5[BarCount-1],a7[BarCount-2]);
}
if(a3[BarCount-2]==1)
{
ShortToFuse(a6[BarCount-1],a7[BarCount-2]);
}
_SECTION_END();

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator based on Level2 data
NinjaTrader
MC PL editor upgrade
MultiCharts
MC Advanced Simulated Trading.
MultiCharts
tick data interval discrepancy
NinjaTrader
Better Renko Gaps
The Elite Circle
 
  #2 (permalink)
meeget13
Bangalore+ India
 
Posts: 1 since Feb 2018
Thanks Given: 0
Thanks Received: 0

what is the meaning of :

SellToFuse

CoverToFuse

BuyToFuse

ShortToFuse

also why we are using a7=0;? what does it mean


please explain

Reply With Quote
  #3 (permalink)
johny
Melbourne, Australia
 
Posts: 20 since Jun 2010
Thanks Given: 0
Thanks Received: 6



meeget13 View Post
what is the meaning of :

SellToFuse

CoverToFuse

BuyToFuse

ShortToFuse

also why we are using a7=0;? what does it mean


please explain

I think those are functions exported by a dll plugin supplied to him by his broker.

Reply With Quote




Last Updated on August 3, 2018


© 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