Attachments forums

List of attachments posted on this forum.


All files on forums: 160923

Re: Coding Help

nine, Fri Oct 25, 2024 1:20 am

hello i am hoping to get some assistance with this. i am attempting to convert an indicator into code for ea signals and it is giving me a little trouble
the concept is, i am trying to convert the indicator to signals for use in an ea confirmation filter that uses the cross of the Trix line form below or above(buy or sell signal)

i am trying to line up the signals form the indicator and the converted EA function verified by a print statement. so i am trying to line up the indicators dot (buy or sell) with the functions print-statement for the cross buy or sell. once i have it functioning i will move the code to the ea.
i tried limiting the functions recalculation from the whole chart to 1000 bars with a user input so it can be adjusted and i tried limiting recalculation to once per bar to mimic the indicator calculation instead of each tick.

that doesn't seem to be the issue. i am trying to get the function call and the iT3 function to operate correctly (the main body of the function and the main calculation for the T3 arrays) i tried to simplify where i could i am using basic settings so there was a getprice() function with choices i am only using my basic setting so i omitted it and replaced it with Close-i in the function call, which is the only price i am using, and what the getprice() returned.

the Close-i is only returning the value for one bar not each bar that is referenced and i cant figure out how to fix it. it may be simple. the print statement in the experts tab shows the loop counting from largest to zero like its supposed to for the reverse iteration loop for the recursive T3 formula. but there is only one value for Close-i. I thought about changing some things but could not get this working so i thought i should keep it as close as possible and ask for help to see what i should do? it is likely something a knowledgeable person is familiar with. the code from the indicator to the function is pretty close almost identical and my code is simple and straight forward with not to many lines. i try to keep it simple. the function consists of an input section(header)/calculation functions/function to check alignment/a wrapper function to organize and send data/ & the temp Ontick-that will be transferred to the EA Ontick.

Please have a look and help me get this functioning if possible. thank for you time and taking the time to read this. having somewhere to ask for help is a god send and i am super excited to getting my project together. this is my return to programing as a hobbyist in over ten years and i appreciate any help to keep me moving forward. excited about your response.

attached below is the indicator and the function i tried to convert from the indicator, i am trying to replicate the crosses(the dots buy/sell signals from the indicator) and verify the functions signals with a print statement and aligning them with the indicator. my issue seems to be getting the function call and the iT3 function to calculate correctly. if i can get the signals printing relative (just working) i figure i can implement a shift or adjust them if need be. just getting this working will be great. Thank you
i saved the indicator with the settings i am using it should match the inputs in the function.
All files in topic